布局://修改listselector 不使用系统默认的选中方式
type.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:layout_gravity="center">
<GridView
android:id="@+id/gv_type"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:numColumns="5"
android:scrollbars="none"
android:listSelector="@drawable/sl_image_home_navigator"
>
</GridView>
</LinearLayout>
type_item.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="4dp"
>
<TextView
android:id="@+id/tv_columnName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:gravity="center"
android:marqueeRepeatLimit="5"
android:maxWidth="@dimen/px310"
android:shadowColor="#88333333"
android:shadowDx="2.0"
android:shadowDy="2.0"
android:shadowRadius="2.0"
android:singleLine="true"
android:textColor="#ffffffff"
android:textSize="20sp"
>
</TextView>
</LinearLayout>
sl_image_home_navigator.xml
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="false" android:drawable="@drawable/transparent_bg" />
<item android:state_focused="true" android:state_pressed="false" android:drawable="@drawable/func_foc" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/func_foc" />
</selector>
func_foc.9.png