mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08: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 resultListener : ResultListener? = null
|
||||||
var bottomSheetResult: Int = ResultListener.RESULT_OK
|
var bottomSheetResult: Int = ResultListener.RESULT_CANCEL
|
||||||
var bottomSheetResultData: Any? = null
|
var bottomSheetResultData: Any? = null
|
||||||
|
|
||||||
override fun onDismiss(dialog: DialogInterface) {
|
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) {
|
private fun showFragment(fragmentClass: KClass<out Fragment>, bundle: Bundle) {
|
||||||
if (supportFragmentManager.findFragmentByTag(fragmentClass.simpleName) == null) {
|
if (supportFragmentManager.findFragmentByTag(fragmentClass.simpleName) == null) {
|
||||||
supportFragmentManager.commitTransaction {
|
supportFragmentManager.commitTransaction {
|
||||||
|
Loading…
Reference in New Issue
Block a user