Here is a code snippet hoping that someone blessed with Android Knowledge wud answer my query... continueUpdate.xml
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/ android" > <PreferenceCategory android:title="@string/softwareUpdate"> <Preference android:key="continueUpdate" android:title="@string/continueUpdate" android:dialogTitle="@string/continueUpdate" /> </PreferenceCategory> </PreferenceScreen> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/ android" > <PreferenceCategory android:title="@string/softwareUpdate"> <Preference android:key="checkUpdate" android:title="@string/checkUpdate" android:dialogTitle="@string/checkUpdate" /> </PreferenceCategory> </PreferenceScreen> Now in code, HelloAndroid.java addPrefrencesFromResource(R.xml.checkpreference); ... ... if(ok) //Expected Output: To replace checkPreference with continuePreference screen. addPrefrencesFromResource(R.xml.continuepreference); //Actual Output: Results in Screen break i.e., appending with previous screen. :( ... ... Whereas if Preference Screen is loaded through code then, setPreferenceScreen(mPS1); ... ... if(ok) //Expected Output: To replace checkPreference with continuePreference screen. setPreferenceScreen(mPS2); //Actual Output: Same as Expected Output :) Please do let me know how do I replace the preference screen through xml. On Jul 14, 10:43 pm, Ravi <[email protected]> wrote: > Hi, > > I need to display another PreferenceScreen through xml which occupies > the full screen. > > Calling addPrefrencesFromResource(id) with different id results in > Screen Break handled by Preference Framework. > > setPreferenceScreen(mPS) could be called again & it works fine but it > is through code...How do I do it through XML? > > Neither inflateFromResource() not PreferenceInflater is available so, > I can't use setPreferenceScreen for XML? > > Plz do clarify. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---
