Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: A good looking (standard) settings menu

Tags:

I'm trying to get my app to blend in as much as possible with the "standard" with the rest of my android device. It's a stand-alone app, not integrated with the OS or anything, I just want it to look familiar.

The area I'm interested in is the "settings" screen. If I look at Android's standard settings screen, it's well spaced, perfect font size, with neat pin stripes between the menu items.

How do I do that? Is that a ListView? Is it done with a regular LinearLayout?

I would love to be able to replicate the look & feel in my app. Can anybody assist?

enter image description here

And it's not just the Adroid OS. it's most of the "professional" apps out there:

enter image description here

Many thanks

like image 545
Hein du Plessis Avatar asked Feb 14 '11 09:02

Hein du Plessis


1 Answers

Actually, this is directly part of the Android source code, so I would strongly advise you to take a look in its structure. See the Android Settings tutorial for more info.

Settings are created from the SettingsActivity (which extends the PreferenceActivity, you might want to look this too), which in their turn have their layout based on the following xml files:

  • preferences.xml
  • preference.xml

Things are quite strongly interlocked so it needs some reading...

like image 168
Sephy Avatar answered Nov 11 '22 09:11

Sephy