Customization of item click effect of Android listview
Customization of item click effect of Android listview
preface:
Friends of listview Android developers know and use a lot. There are many articles about item click effects of Android listview on the Internet. I have also read a lot of articles about listview. Here are some good articles for your reference,
It's really unwise to get this effect before. I add a selector XML file to the item layout file to achieve the item click effect of listview.
This is another way for me to record how to use it in the future:
Create a new item selector.xml file as follows:
Introduce Android where listview is needed: listselector = "@ drawable / item_selector"
In fact, I can only blame myself for ignoring < item Android: drawable = "@ Android: color / transparent" / > when writing selector files, which leads to a lot of detours to complete. Remember this.
Thank you for reading, hope to help you, thank you for your support to this site!