Commit e119bfde authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

fix toolbar dissappear after logout

parent 3821836f
......@@ -90,7 +90,16 @@ class RoomParkMainActivity(
get() = headerToolbar.findViewById<MaterialTextView>(R.id.back_button_chevron)
override fun setToolbar(header:HeaderToolbarModel?,status:StatusToolbarModel?){
appBar.setExpanded(false,false)
if (header == null && status == null){
hideAll()
appBar.setGone(true)
return
} else appBar.setGone(false)
showAll()
appBarScrollable(false)
Timber.d("NOTGONE")
headerToolbar.setGone(header==null)
statusToolbar.setGone(status==null)
header?.let {
......@@ -104,7 +113,6 @@ class RoomParkMainActivity(
statusToolbar.status_icon.setGone(it.state == null)
statusToolbar.status_title.setGone(it.state == null)
it.state?.let { state ->
Timber.d("status: $state")
statusToolbar.status_icon.isEnabled = when(state){
StatusState.AVAILABLE -> true
else -> false
......@@ -128,13 +136,13 @@ class RoomParkMainActivity(
override fun hide() {
bottomNavigation.visibility = BottomNavigationView.GONE
bottomShadow.visibility = View.GONE
bottomNavigation.setGone(true)
bottomNavigation.setGone(true)
}
override fun show() {
bottomNavigation.visibility = Toolbar.VISIBLE
bottomShadow.visibility = View.VISIBLE
bottomNavigation.setGone(false)
bottomNavigation.setGone(false)
}
......
......@@ -31,7 +31,7 @@ class AuthScreenController :
override fun onViewBound(v: View) {
toolBar.hideAll()
toolBar.setToolbar()
bottomNavigation.hide()
}
......
......@@ -123,6 +123,7 @@ class BNVRouterPagerAdapter(
}
fun drawToolbar(position: Int){
return
val toolBar = currentPrimaryRouter?.activity as ICollapsingToolBar
toolBar.showAll()
toolBar.appBar.setExpanded(false,true)
......
......@@ -24,7 +24,7 @@ class SplashScreenController :
override fun onViewBound(v: View) {
toolBar.hideAll()
// toolBar.setToolbar()
bottomNavigation.hide()
}
......
......@@ -41,7 +41,7 @@
app:contentInsetStart="0dp"
android:minHeight="0dp"
app:titleEnabled="false"
tools:visibility="visible">
tools:visibility="invisible">
<androidx.appcompat.widget.Toolbar
android:id="@+id/top_toolbar"
......@@ -53,7 +53,7 @@
android:contentInsetEnd="0dp"
android:contentInsetRight="0dp"
android:padding="0dp"
android:visibility="visible"
android:visibility="invisible"
android:minHeight="0dp"
app:contentInsetEnd="0dp"
app:contentInsetLeft="0dp"
......
......@@ -10,7 +10,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginTop="0dp"
android:layout_marginEnd="16dp"
android:background="#00000000"
app:tabIndicatorColor="@color/colorAccent"
......
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