标签:
方法一,在控件被初始化的时候设置
|
1
2
|
gridView.setSelector(new
ColorDrawable(Color.TRANSPARENT));listView.setSelector(new
ColorDrawable(Color.TRANSPARENT)); |
方法二,在布局文件中设置listSelector属性
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<GridView android:listSelector="@android:color/transparent" android:numColumns="auto_fit" android:columnWidth="50dp" android:stretchMode="spacingWidth" android:layout_weight="1.0" android:layout_height="0dip" android:layout_width="match_parent"/><ListView android:listSelector="@android:color/transparent" android:layout_height="match_parent" android:layout_width="match_parent"/> |
|
标签:
原文地址:http://blog.csdn.net/luo446718254/article/details/44938907