Reputation: 369
I have a list of items in a listView. I would like to highlight the first item of this listview so that the user knows top item is active. How can I go about doing this?
Something like the image
Upvotes: 0
Views: 1025
Reputation: 1177
Try Some like tha: create custom listview adapter like that and adapter, Custom adapter for a list of items that have multiple child items? then set bg like that:
if (position == 0) {
// define layout here list 1st item
view.setBackground(R.drawable.bg);
} else {
// others
view.setBackground(R.drawable.bg);
}
Upvotes: 2