diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPreparedStateFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPreparedStateFragment.kt index 12bac0ec..e647c0ce 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPreparedStateFragment.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPreparedStateFragment.kt @@ -1,5 +1,7 @@ package es.verdnatura.presentation.view.feature.paletizador.fragment +import android.content.pm.ActivityInfo +import android.os.Bundle import android.view.KeyEvent import android.view.View import android.view.inputmethod.EditorInfo @@ -15,7 +17,7 @@ import es.verdnatura.presentation.view.feature.delivery.viewmodels.DeliveryViewM import es.verdnatura.presentation.view.feature.ubicador.adapter.AutomaticAdapter @Suppress("UNUSED_ANONYMOUS_PARAMETER") -class ExpeditionPreparedStateFragment(var codeState: String, var title: String) : +class ExpeditionPreparedStateFragment(var codeState: String = "PREPARED", var title: String = "") : BaseFragment( DeliveryViewModel::class ) { @@ -29,9 +31,20 @@ class ExpeditionPreparedStateFragment(var codeState: String, var title: String) companion object { fun newInstance(codeState: String, title: String) = ExpeditionPreparedStateFragment(codeState = codeState, title = title) + + fun newInstance() = ExpeditionPreparedStateFragment() } override fun getLayoutId(): Int = R.layout.fragment_automatic_add_expedition + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT + } + + override fun onDestroyView() { + super.onDestroyView() + activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT + } override fun init() { ma.hideBottomNavigation(View.GONE)