1

I have been tired apply a style or a layout to a preference, but it didn't work well. Could anyone help me with this?

This is an image which shows the result I want

I also find someone say it could be done in listview,But I wanna how to make those blank spaces between two block?

Please, help me with this , it has been puzzled me a long time.Thanks!

alvan
  • 203
  • 4
  • 11
  • Where did you get this screenshot? I'm guessing this is a settings page created for a specific range of phones by the phone provider. If so, this is a custom view that you won't be able to access. It looks like a `ScrollView` on a custom background with custom `ViewGroup`s possibly containing custom `Spinner`s but I'm not sure. – Squonk Oct 26 '11 at 08:28
  • 2
    "Where did you get this screenshot?" - Isn't it an iPhone screenshot? – Ricky Oct 26 '11 at 08:30
  • To Ricky, it is an iPhone screenshot, I want to make the same thing on the android – alvan Oct 27 '11 at 02:06

2 Answers2

1

You can have a transparent divider between ListItems

android:dividerHeight="10 dip"

Community
  • 1
  • 1
Reno
  • 33,594
  • 11
  • 89
  • 102
  • Thanks for your reply,Reno. Yes,Your solution can seperate those blocks. But here's the thing, I only know how to pass a layout to a custom adpater and create a lot of cells with the same layout. but as you can see from the pic, every block is different from others. How can I made this? and Please teach me how to make a header to each block, Thanks! – alvan Oct 26 '11 at 09:38
0

You can group your preferences by using PreferenceCategories and PreferenceScreens. If you want a preference to have an icon associated with it, you can use the android:icon attribute on the preference. Are there any specific characteristics of the iPhone settings that you're trying to replicate. You're not going to get your preferences to look exactly like the iPhones setting page, but you can certainly mimic certain characteristics.

Kurtis Nusbaum
  • 30,445
  • 13
  • 78
  • 102
  • Thanks,but I find there's no android:background attr in the PreferenceScreens. How could I implement the the same style to the screenshots? – alvan Oct 27 '11 at 02:59