-1

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

https://i.stack.imgur.com/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

Rowel
  • 434
  • 1
  • 4
  • 9
  • If you can post your layout xmls it might be helpful. Looks like you are defining your own color themes (if you already extended make sure to extent it by Theme.Holo. (in styles.xml) and (In AndroidManifest.xml) – Rajendra Feb 01 '13 at 21:49
  • Hi Roller, thanks for pointing that out. I didn't notice it earlier, your are correct that I'm defining my own color themes in AndroidManifest.xml. After removing android:theme="@style/AppTheme" i was able to achieve what I want. – Rowel Feb 02 '13 at 05:32

1 Answers1

0

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.

Rajendra
  • 1,703
  • 2
  • 16
  • 22
  • Thanks Roller for your comments, I was able to make the masterdetail style but my problem is I can't make it look like the one I needed, action bar, color, etc. (Note: have edited the image in the original post) – Rowel Feb 01 '13 at 16:30
  • For ActionBar, the developer docs have the reference code: http://developer.android.com/guide/topics/ui/actionbar.html. The color you wanted is by the default Android Holo Theme you can set in the manifest XML. Refer: http://android-developers.blogspot.com/2012/01/holo-everywhere.html – Rajendra Feb 01 '13 at 21:44