mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 20:06:51 +03:00
Better rotation support
This commit is contained in:
parent
3642ca5b4a
commit
a4e163885d
2 changed files with 8 additions and 1 deletions
|
@ -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 a new issue