I really like the look and feel of the Preference UI items and want to replicate that in my application. Basically I've got an Activity with a couple LinearLayo开发者_C百科uts set to be focusable. When they are focused, I want them to turn green (like Preferences do). Any idea how to apply that style to my LinearLayouts?
Note: The LinearLayouts are essentially going to be clickable 'buttons' to launch a separate activity. They are NOT actual preferences or buttons, although they need to look/act similar to them.)
The preference UI system is made from a ListView
, not a LinearLayout
. Each preference is a row in the list. That will be much simpler to implement than will doing this via nested focusable LinearLayouts
.
If it helps, you can use my SackOfViewsAdapter
as an idea how to build a ListAdapter
that can return a set of rows that all look different.
精彩评论