The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.


Advanced Preferences

We saw SharedPreferences and PreferenceFragment earlier in the book. However, we can have more elaborate preference collection options if we wish, such as a full master-detail implementation like the Settings app sports. There are also many other common attributes on the preference XML elements that we might consider taking advantage of, such as allowing us to automatically enable and disable preferences based upon whether some other preference is checked or unchecked.

In this chapter, we will explore some of these additional capabilities in the world of Android preferences.

Prerequisites

Understanding this chapter requires that you have read the core chapters, particularly the one on SharedPreferences.

Introducing PreferenceActivity

The preview of this section apparently resembled a Pokémon.

Intents for Headers or Preferences

The preview of this section is [REDACTED].

Conditional Headers

The preview of this section is [REDACTED].

Dependent Preferences

The preview of this section was accidentally identified as an Android 'tasty treat' by the Cookie Monster.

Nested Screens

The preview of this section took that left turn at Albuquerque.

Listening to Preference Changes

The preview of this section apparently resembled a Pokémon.

Defaults, and Defaults

The preview of this section will not appear here for a while, due to a time machine mishap.

Listening to Preference Value Changes

The preview of this section took that left turn at Albuquerque.

Dynamic ListPreference Contents

The preview of this section left for Hollywood to appear in a reality TV show.

Dealing with External Changes to Preferences

The preview of this section is unavailable right now, but if you leave your name and number at the sound of the tone, it might get back to you (BEEEEEEEEEEEEP!).

Preferences in Device Settings App

The preview of this section was whisked away by a shark-infested tornado.