去掉gridview本身的点击效果:android:listSelector="@color/de_transparent";
添加两个selector,灰色的press和normal样式,还有蓝色的press和normal样式;
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
android:useLevel="false" >
<solid android:color="@color/colorPrimaryDark" />
<size android:width="20dp"
android:height="20dp"/>
</shape>
</item> <item>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
android:useLevel="false" >
<solid android:color="@color/colorAccent" />
<size android:width="20dp"
android:height="20dp"/>
</shape>
</item>
</selector>