mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-22 23:58:47 +01:00
Better rotation support
This commit is contained in:
parent
3642ca5b4a
commit
a4e163885d
@ -97,7 +97,7 @@ abstract class VectorBaseBottomSheetDialogFragment : BottomSheetDialogFragment()
|
||||
}
|
||||
|
||||
var resultListener : ResultListener? = null
|
||||
var bottomSheetResult: Int = ResultListener.RESULT_OK
|
||||
var bottomSheetResult: Int = ResultListener.RESULT_CANCEL
|
||||
var bottomSheetResultData: Any? = null
|
||||
|
||||
override fun onDismiss(dialog: DialogInterface) {
|
||||
|
@ -119,6 +119,13 @@ class SharedSecureStorageActivity : SimpleFragmentActivity(), VectorBaseBottomSh
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachFragment(fragment: Fragment) {
|
||||
super.onAttachFragment(fragment)
|
||||
if (fragment is VectorBaseBottomSheetDialogFragment) {
|
||||
fragment.resultListener = this
|
||||
}
|
||||
}
|
||||
|
||||
private fun showFragment(fragmentClass: KClass<out Fragment>, bundle: Bundle) {
|
||||
if (supportFragmentManager.findFragmentByTag(fragmentClass.simpleName) == null) {
|
||||
supportFragmentManager.commitTransaction {
|
||||
|
Loading…
Reference in New Issue
Block a user