开发者

DialogPreference causes FC

开发者 https://www.devze.com 2023-02-09 05:05 出处:网络
I\'m trying to implement a DialogPreference in the preferences layout. Unfortunatly, the code below always causes a force close. EditTextPreferences work well but I need a simple dialog.

I'm trying to implement a DialogPreference in the preferences layout. Unfortunatly, the code below always causes a force close. EditTextPreferences work well but I need a simple dialog. Any suggestions what's wrong here?

<DialogPreference
        android:id="@+id/reset_languages"
        android:negativeButtonText="@string/no"
        android:positiveButtonText="@string/yes"
        android:dialogTitle="@string/reset_l开发者_如何学JAVAanguages"
        android:dialogMessage="@string/reset_languages_confirmation"
        android:title="@string/reset_languages"
        android:summary="@string/reset_languages_summ" />


Solved by extending the DialogPreferences class

0

精彩评论

暂无评论...
验证码 换一张
取 消