When the PreferenceActivity encounters nested PreferenceScreens in the
hierarchy, it will add the inner PreferenceScreen as a list entry
(similar appearance as e.g. for a EditTextPreference) to the outer
PreferenceScreen. When the user clicks on this list entry, the
contents of the inner PreferenceScreen will be shown.

If this explanation does not make sense to you, just open Settings on
your phone. You can imagine all the entries shown on that screen
("Wireless controls", "Call settings" etc.) being inner
PreferenceScreens of the main PreferenceScreen. When you click on an
entry, the contents of that particular inner PreferenceScreen will be
shown.

I think the "Dialog" refers to the new - automatically generated -
screen that is shown when you click on the list entry and drill down
into the inner PreferenceScreen. It doesn't really look like a dialog,
but that's probably what it is. (As an alternative, the inner
PreferenceScreen could specify an activity intent that is fired when
the user clicks on its list entry.)

Christoph


On Tue, Feb 10, 2009 at 2:00 AM, robert <ma.ning....@gmail.com> wrote:
>
> Hi All:
>    When I see the doc of Preference Screen, there is one paragraph
> about the sub-preference screen related to dialog, the doc is as
> follow:
>    ---> When it appears inside another preference hierarchy, it is
> shown and serves as the gateway to another          screen of
> preferences (either by showing another screen of preferences as a
> Dialog or via a Context.startActivity(android.content.Intent) from the
> Preference.getIntent()). The children of this PreferenceScreen  are
> NOT shown in the screen that this PreferenceScreen is shown in.
> Instead, a separate screen will be shown when this preference is
> clicked.
>     But in Android Api Demo, the Preference from code, I find nothing
> related to Dialog when using PreferenceScreen as the base element of
> preference, and I have no idea about 'showing another screen of
> preferences as a Dialog', what does it mean? Is there a pop-dialog
> when we click anywhere in Preference Screen? But the Preference Screen
> is invisible. So I wanna know if there is any suggestion about my
> question, and thanks in advance!
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to