20
Android 以非销毁的方式隐藏 DialogFragment
source link: https://droidyue.com/blog/2021/08/08/how-to-hide-dialogfragment-without-destroying-it/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Android 以非销毁的方式隐藏 DialogFragment
Aug 8th, 2021
我们都知道使用DialogFragment.dismiss
可以关闭 DialogFragment(并销毁)。但是有时候,我们仅仅需要隐藏,不需要销毁。 使用下面的方法即可。
隐藏 DialogFragment
myDialogFragment.dialog?.hide()
恢复 DialogFragment
myDialogFragment.dialog?.show()
Posted by androidyue Aug 8th, 2021Android, DialogFragment
« Ubuntu下 /usr/lib/* 内容恢复 ProtoPie 无代码原型工具恢复上架,享荔枝半价优惠,仅需 429 元 »
0 comments
Be the first person to leave a comment!
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK