Highlight custom listview item when long click

后端 未结 2 1494
Happy的楠姐
Happy的楠姐 2020-11-29 05:32

I have created a custom listview which has an ImageView on the left and a TextView on the right. And implementing a multi-selection

2条回答
  •  长情又很酷
    2020-11-29 05:59

    Set in the layout file of your list's row (in the top level component, usually a LinearLayout or RelativeLayout):

    android:background="?android:attr/activatedBackgroundIndicator"

    To understand what it does exactly, check this other question.

提交回复
热议问题