selected item on custom listview with contextual action bar

I’ve only ever tested this in CHOICE_MODE_SINGLE, but in that situation it works by doing the following.

  • When you select a list item, in code, call “setItemChecked(position, checked)” method (on the ListView instance) for that item in the list.

  • Add this to the XML for individual ListView items:
    android:background="?android:attr/activatedBackgroundIndicator"

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)