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