0

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 imageenter image description here

isudansh
  • 370
  • 3
  • 16

1 Answers1

2

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);
    }
Community
  • 1
  • 1
Engr Waseem Arain
  • 1,163
  • 1
  • 17
  • 36