先配置一个类似于Button按下效果的xml文件
list_item_selector.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/list_item_pressed" />
</selector>
之后在ListView的Item的布局文件中(不是ListView里面)加上引用:
android:background="@drawable/list_item_selector"