有时候我们点击gridview时,item有选中效果,背景是黄色,去掉这一效果需要:
1、在drable新建xml文件,并在gridview里面用lisetselector引用
android:listSelector="@drawable/grid_selector"
2、定义内容
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" >
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:drawable="@drawable/back_white"
android:state_pressed="true"/>
<item
android:drawable="@drawable/back_white"
android:state_window_focused="false"/>
<item
android:drawable="@drawable/back_white"
android:state_window_focused="true"/>
</selector>
</animation-list>