Reputation:
I'm trying from this xml and want to add radio button but not getting solution . Here i am not getting proper solution .so suggest me . Here also attach image which type UI iwant from using Preference screen.
<Preference
android:key="@string/pref_key_passcode_toggle"
android:persistent="false"
android:widgetLayout="@layout/check_custom"
android:title="@string/passcode_turn_on" />
<Preference
android:minHeight="10dp"
android:key="@string/pref_key_change_passcode"
android:persistent="false"
android:title="@string/passcode_change_passcode"
/>
<Preference
android:height="40dp"
android:key="@string/pref_key_change_password"
android:persistent="false"
android:title="@string/password_change"
/>
</PreferenceCategory>
Upvotes: 2
Views: 1315
Reputation: 2260
All EXISTING preferences can be found here. If you're not too picky on showing all the options at all times, you can use ListPreference. It will only show the currently selected option in the layout. When the user selects it, a dialog will be shown displaying the list of all options to choose from.
If you truly want it to look like the image above, you'll need to extends Preference and implement your own MultiSelectPreference. You can specify your own layout and use standard widgets to design it exactly how you want it to look.
Upvotes: 1