I have a layout similar to the ICS Gmail app for tablets (ListFragment
on the left and content on the right) and I was wondering how I could go about constructing t
Just to let everyone know (because there seems to be a lack of information out there on this topic), this is achieved within the background selector XML of the individual list rows' view. For example, this is the main screen's layout,
...
But the magic comes in the list_item_selector
:
By defining these as 9-patch drawables like this, you can have each list item contribute it's width worth of shadow to that line in the middle, and when it is activated, that segment of shadow will be replaced by an arrow. I hope this helps someone, as it's sure helped me!