Currently I can open one DialogPreference
by defining it inside a layout:
<DialogPreference
android:key="miDialogo" android:title="Preferencias"
android:dialogLayout="@layout/fun_layout"
android:positiveButtonText="OK"
android:negativeButtonText="Cancel"
/>
How could I open it from code? There are no longer methods exposed as .Show()
or similar...
I wrote this post (in English) that explains it in detail.
Summarizing, the code is:
This might help, (I can't test it right now), but if I understand your question this might help you, if you have an account
MyDialogPreference
extends classDialogPreference
with this method:UPDATE: Or what you want is something like startPreferencePanel
.
Within the directory
settings
in the link you can look at the classesDisplaySettings
and others to see if it adapts to what you are looking for.Variation without click
.
http://www.programcreek.com/java-api-examples/index.php?source_dir=android_packages_apps-master/Settings/src/com/android/settings/fuelgauge/PowerUsageDetail.java