Commit 4bd41430 authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

set fitsystemswindow == true seems not able to help

parent d11513ae
......@@ -3,6 +3,7 @@ package com.biganto.visual.roompark.base
import android.os.Bundle
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import androidx.appcompat.widget.Toolbar
import androidx.coordinatorlayout.widget.CoordinatorLayout
import butterknife.BindView
......@@ -37,6 +38,8 @@ class RoomParkMainActivity(
@BindView(R.id.topToolbarHolder) override lateinit var coordinatorLayout: CoordinatorLayout
@BindView(R.id.conductor_container) override lateinit var conductorContainer: ViewGroup
@BindView(R.id.bottom_navigation_view) override lateinit var bottomNavigation: BottomNavigationView
@BindView(R.id.custom_toolbar_container) lateinit var tbContainer: LinearLayout
@BindView(R.id.bottom_view_divider) lateinit var bottomShadow: View
......@@ -73,10 +76,10 @@ class RoomParkMainActivity(
override val statusToolbar: ViewGroup
get() = topAppBar.findViewById<ViewGroup>(R.id.status_toolbar_container)
get() = tbContainer.findViewById<ViewGroup>(R.id.status_toolbar_container)
override val headerToolbar: ViewGroup
get() = topAppBar.findViewById<ViewGroup>(R.id.switch_toolbar_container)
get() = tbContainer.findViewById<ViewGroup>(R.id.switch_toolbar_container)
override fun hide() {
......
......@@ -74,11 +74,15 @@ class DealScreenController :
Timber.d("content insets : ${toolBar.topAppBar.contentInsetEnd}")
activity?.actionBar?.setDisplayShowTitleEnabled(false)
toolBar.statusToolbar.visibility=View.GONE
toolBar.headerToolbar.visibility=View.VISIBLE
toolBar.statusToolbar.visibility=View.VISIBLE
toolBar.headerToolbar.visibility=View.GONE
toolBar.headerToolbar.findViewById<MaterialTextView>(R.id.toolbar_title).text = "Azzzzaa"
toolBar.topAppBar.invalidate()
activity?.actionBar?.setDisplayShowTitleEnabled(true)
}
......
......@@ -50,7 +50,6 @@ class DealsScreenController :
private fun setToolbar(){
toolBar.topAppBar.removeAllViews()
toolBar.showAll()
toolBar.appBar.setExpanded(false,true)
toolBar.topAppBar.title = "МОИ СДЕЛКИ"
......
......@@ -34,15 +34,16 @@
android:contentInsetLeft="0dp"
android:contentInsetEnd="0dp"
android:contentInsetRight="0dp"
android:minHeight="24dp"
android:visibility="visible"
app:contentInsetEnd="0dp"
app:contentInsetLeft="0dp"
app:contentInsetRight="0dp"
app:contentInsetStart="0dp"
android:fitsSystemWindows="true"
tools:visibility="visible">
<androidx.appcompat.widget.Toolbar
android:fitsSystemWindows="true"
android:id="@+id/top_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -65,6 +66,10 @@
app:titleTextAppearance="@style/Header_TextView.Main_Header">
<LinearLayout
android:minHeight="24dp"
android:id="@+id/custom_toolbar_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
......@@ -75,10 +80,12 @@
layout="@layout/status_layout_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:visibility="visible" />
<include
layout="@layout/switch_toolbar"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible" />
......
......@@ -4,11 +4,13 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/status_toolbar_container"
android:layout_width="match_parent"
android:fitsSystemWindows="true"
android:layout_height="wrap_content"
android:orientation="vertical">
<FrameLayout
android:id="@+id/status_icon"
android:fitsSystemWindows="true"
android:layout_width="8dp"
android:layout_height="8dp"
android:layout_marginStart="16dp"
......@@ -22,6 +24,7 @@
<com.google.android.material.textview.MaterialTextView
android:id="@+id/status_title"
android:fitsSystemWindows="true"
style="@style/Accent_Minor_TextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......@@ -37,7 +40,7 @@
android:layout_height="24dp"
android:layout_marginEnd="16dp"
android:scaleType="centerCrop"
android:fitsSystemWindows="true"
android:tint="@color/colorGray"
app:layout_constraintBottom_toBottomOf="@+id/status_icon"
app:layout_constraintEnd_toEndOf="parent"
......
......@@ -21,9 +21,11 @@
app:drawableTint="@color/colorAccent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:fitsSystemWindows="true"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.textview.MaterialTextView
android:fitsSystemWindows="true"
android:id="@+id/toolbar_title"
style="@style/Header_TextView.Main_Header"
android:layout_width="wrap_content"
......@@ -50,6 +52,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toEndOf="@+id/toolbar_title"
android:fitsSystemWindows="true"
app:layout_constraintTop_toTopOf="parent" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment