Commit 127391e9 authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

upgrade hide/show status bar flow

parent b80e5724
......@@ -38,18 +38,6 @@ class ChooseResolutionDialogController : Controller {
lateinit var recyclerView : RecyclerView
// override fun onAttach(view: View) {
// tempSystemUiFlag = activity?.window?.decorView?.systemUiVisibility
// activity?.window?.decorView?.systemUiVisibility = View.SYSTEM_UI_FLAG_FULLSCREEN
// super.onAttach(view)
// }
//
// private var tempSystemUiFlag : Int? = null
// override fun onDetach(view: View) {
// activity?.window?.decorView?.systemUiVisibility = tempSystemUiFlag?:View.SYSTEM_UI_FLAG_LAYOUT_STABLE
// super.onDetach(view)
// }
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup): View {
val view = inflater.inflate(getLayoutId(), container, false)
......@@ -69,17 +57,16 @@ class ChooseResolutionDialogController : Controller {
(recyclerView.adapter as PhotoSizeAdapter).notifyDataSetChanged()
}
view.findViewById<View>(R.id.cancel_button).setOnClickListener { handleBack() }
return view
}
@LayoutRes
fun getLayoutId() = R.layout.choose_size_modal_screen
var dismissActionDelegate = {
router.popCurrentController()
Unit
// args.putParcelableArrayList("sdsd", arrayListOf<PhotoModel>())
override fun handleBack(): Boolean {
return router.popCurrentController()
}
......
......@@ -2,6 +2,7 @@ package com.biganto.visual.roompark.presentation.screen.photo
import android.os.Bundle
import android.view.View
import android.view.WindowManager
import android.widget.ImageView
import androidx.core.os.bundleOf
import androidx.viewpager2.widget.ViewPager2
......@@ -62,12 +63,11 @@ class PhotoScreenController :
}
override fun onAttach(view: View) {
tempSystemUiFlag = activity?.window?.decorView?.systemUiVisibility
activity?.window?.decorView?.systemUiVisibility = View.SYSTEM_UI_FLAG_FULLSCREEN
// tempSystemUiFlag = activity?.window?.decorView?.systemUiVisibility
super.onAttach(view)
}
private var tempSystemUiFlag : Int? = null
private var tempSystemUiFlag : Int? = View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
override fun onDetach(view: View) {
// activity?.window?.decorView?.systemUiVisibility = tempSystemUiFlag?:View.SYSTEM_UI_FLAG_LAYOUT_STABLE
super.onDetach(view)
......@@ -95,6 +95,9 @@ class PhotoScreenController :
toolBar.setToolbar()
bottomNavigationController.hide()
bindRecycler()
// activity?.window?.decorView?.systemUiVisibility = View.SYSTEM_UI_FLAG_FULLSCREEN
activity?.window?.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN)
}
override fun injectDependencies() {
......@@ -159,7 +162,12 @@ class PhotoScreenController :
// (photoViewPager.adapter as PhotoViewerAdapter).setItems(arrayListOf(viewState.model))
}
override fun handleBack(): Boolean {router.popController(this); return true}
override fun handleBack(): Boolean {
activity?.window?.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN)
// activity?.window?.decorView?.systemUiVisibility = tempSystemUiFlag?:View.SYSTEM_UI_FLAG_LAYOUT_STABLE
router.popController(this)
return true
}
override fun getLayoutId(): Int = R.layout.photo_view_screen
......
......@@ -4,8 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayout7"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary">
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/frameLayout2"
......@@ -26,7 +25,8 @@
style="@style/Header_TextView.Main_Header"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:background="@color/colorPrimary"
android:paddingStart="16dp"
android:text="ОТКРЫТЬ\nВ ДРУГОМ РАЗМЕРЕ"
android:textAlignment="viewStart"
app:layout_constraintBottom_toTopOf="@+id/include4"
......@@ -47,16 +47,19 @@
android:id="@+id/photoSizesRecyclerView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
app:layout_constraintBottom_toTopOf="@+id/materialTextView"
android:background="@color/colorPrimary"
android:paddingStart="16dp"
app:layout_constraintBottom_toTopOf="@+id/cancel_button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/materialTextView"
android:id="@+id/cancel_button"
style="@style/Default_TextView.Cancel_Text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:clickable="true"
android:gravity="center"
android:paddingTop="32dp"
android:paddingBottom="64dp"
......
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