fython / BiometricPromptCompat

A Thrid-party BiometricPrompt compat library.
Apache License 2.0
263 stars 23 forks source link

Dialog will dismiss after rotating screen (Api23Impl) #1

Open fython opened 6 years ago

fython commented 6 years ago

Dialog cannot keep its state after rotating screen. Most of time, we use DialogFragment to solve this problem. But it will break original-like API style (Need developers to add Fragment to FragmentManager by themselves.).

I have implemented a simple version of DialogFragment for BiometricPromptApi23Impl which is still undocumented: AbstractBiometricPromptDialogFragment. I think I should make it easier to use before releasing it.

If you have any idea, welcome to comment here.


中文:

Dialog 不能在旋转屏幕后保持它的状态。大多时候我们会使用 DialogFragment 来解决这个问题,但它会破坏类原生接口的风格(需要开发者自行将 Fragment 加入 FragmentManager)。

我已经为 BiometricPromptApi23Impl 实现了一个未记入文档的简单版本 Fragment ——AbstractBiometricPromptDialogFragment。我想我应该让它更易于使用再发布。

如果你有任何点子,欢迎在此发表评论。