Search code examples
androidpreference

Android Preference Screen to look like device admin


i want to achieve the theme of the device admin in my preference screen, see image below to show what I mean.

https://i.sstatic.net/TZHnF.png

i have followed the example in sdk but ended up with something like this

http://i48.tinypic.com/b4xkl0.png

how can i achieve the first image?

EDIT: I found out it is actually a device default theme


Solution

  • I think to get the first view, you need to use MasterDetail View. Left fragment is a List View (Categories) and the right view a Detailed view is again ListView with category detail items.

    Check the MasterDetailView example at http://developer.android.com/training/basics/fragments/fragment-ui.html.

    I am not sure the Preferences API supports this directly.