I’m having the following problem: I have a ListView and I get the layout for its items from an xml file. The thing is, though, that there should be some space between sequential items which I accomplish by nesting my layout into a dummy RelativeLayout just so that I can set marginTop =” ” to the layout containing the item. The problem is that when the user clicks an item of the ListView the whole area (including the gap between sequential items) becomes selected. How do I deal with this? Thanks!
Share
Instead of nesting items in a RelativeLayout, why not try using the listview’s own “divider” to separate items?
In your ListView xml, add:
(or some other value)