I want highlight the first element of my listview programmatically, when the Activity is created.
The highlight options of my ListView are:
<item name="android:choiceMode">singleChoice</item>
<item name="android:listSelector">@color/green</item>
I tried a lot of methods to initialiaze the highlight, all not working.
- list.setSelection();
- list.setItemChecked();
- list.performItemClick();
- maybe other...
Why is so painfull highlighting a ListView item from code? What I should know?