Furthermore, the preferences shown will follow the visual style of system
preferences. It is easy to create a hierarchy of preferences (that can be
shown on multiple screens) via XML. For these reasons, it is recommended to
use this fragment (as a superclass) to deal with preferences in applications.

The fragment implementation itself simply populates the preferences
when created. Note that the preferences framework takes care of loading
the current values out of the app preferences and writing them when changed: