20

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

Hein du Plessis
  • 3,305
  • 6
  • 34
  • 51
  • 5
    Great question. This is the first result on google, is very well edited and helped me. People often don't realize great questions are as important as great answers. Thanks. – MaiaVictor Oct 21 '12 at 00:16

2 Answers2

11

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:

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

alexgophermix
  • 4,189
  • 5
  • 32
  • 59
Sephy
  • 50,022
  • 30
  • 123
  • 131
0

AFAIK its a ListView. by implementing a custom ListView, you can achieve similar effect.

Moreover, you'll have to follow the Icon Design Guidelines to create such icons for ListView rows

Aman Alam
  • 11,231
  • 7
  • 46
  • 81
  • Thanks, are you saying I should create a custom widget? There's no standard one I can re-use? Or are you saying that I can just use a listview, but add my own list items. I'm not too worried about the icons for now, just the text. Thanks. – Hein du Plessis Feb 14 '11 at 10:30
  • Yes, I am saying about providing a ListView with custom adapters. in those adapters, you can decide how your row looks. – Aman Alam Feb 14 '11 at 10:35
  • Thanks, Sheikh. How would I supply the list items? From an xml file or can I hardcode it in the original layout xml? Or should it be done programatically? – Hein du Plessis Feb 14 '11 at 11:11
  • I just link you to one of my blog posts which has an example of custom list adapter, you can find where i have put data source and how I have customised each of the row. That maybe helpful to you. Find it here: http://goo.gl/tUzNN – Aman Alam Feb 14 '11 at 11:33
  • Thanks again Sheikh - very sophisticated but I think an overkill to what I need. I'll keep it bookmarked, though! – Hein du Plessis Feb 14 '11 at 12:54
  • Sure! That was just an example of how you can customise each row. IF not required, one can always have only one layout for all the rows (As in your case, perhaps). – Aman Alam Feb 15 '11 at 06:28