1

I am trying to create custom dialog preference that will hold radio group with two radio buttons and one edittext. If I write something like

<DialogPreference android:title="preftitle" android:dialogLayout="@layout/preflayout" android:summary="pref summary" android:key="prefkey" android:defaultValue="defaultValue" />
the application breaks when trying to create PreferenceActivity that holds this dialog preference.

I guess I have to subclass DialogPreference and put that subclass as xml element. But I don't know what methods should I override and how.

Could anyone help?

Nemanja
  • 343
  • 1
  • 4
  • 7
  • possible duplicate of [Concise way of writing new DialogPreference classes?](http://stackoverflow.com/questions/4505845/concise-way-of-writing-new-dialogpreference-classes) – CommonsWare Feb 26 '11 at 23:22

1 Answers1

3

Take a look here,

creating a DialogPreference from XML

You are correct, you need to subclass DialogPreference.

Community
  • 1
  • 1