Nemanja
Nemanja

Reputation: 343

Android: subclassing DialogPreference

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?

Upvotes: 1

Views: 2788

Answers (1)

Brad Mccormack
Brad Mccormack

Reputation: 84

Take a look here,

creating a DialogPreference from XML

You are correct, you need to subclass DialogPreference.

Upvotes: 3

Related Questions