0

Should i inherit from another activity class? I need to use dialog fragments on PreferenceActivity so the Activity should be FragmentActivity inheritor. I can use support library but i can't understand - from one hand i should inherit from PreferenceActivity, from another - from FragmentActivity

4

1 回答 1

0

我需要在 PreferenceActivity 上使用对话框片段,因此 Activity 应该是 FragmentActivity 继承者。

这是不可能的,除非可能将整个 Android 2.x 实现克隆PreferenceActivity到您自己的扩展类中FragmentActivity

通常,与首选项关联的对话框是通过创建自定义DialogPreference类来处理的,而不是通过DialogFragment.

于 2013-05-16T12:41:47.647 回答