How to get title of preferencescreen in android -
i trying gate title of preferencesreen in program ..anybody tell me how can title? code of preference xml here. want title "show list" in program.
<?xml version="1.0" encoding="utf-8"?> <preferencescreen xmlns:android="http://schemas.android.com/apk/res/android"> <preferencecategory android:title="settings"> <preferencescreen android:title="show list" android:key ="show_list" android.id="@+id/preference_screen"> <intent android:action="android.intent.action.view" android:targetpackage="com.picknext" android:targetclass="com.picknext.pickname" /> </preferencescreen> <listpreference android:title="remove after pick" android:key="selection_of_y_n_name_pick" android:entries="@array/selection_of_y_n_namepick" android:entryvalues="@array/value_of_y_n_naempick" android:defaultvalue="yes" /> </preferencecategory> </preferencescreen>
you have class extends preferenceactivity. inside (for example in oncreate()) have call addpreferencesfromresource(). after have access title via methods gettitle() , settitle().
i hope helps.
Comments
Post a Comment