demo:

 "@+id/lv_left_menu"        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:layout_marginTop="50dp"        android:divider="@android:color/transparent"  //取出ListView自带的分割线。        android:listSelector="@android:color/transparent" />
这个可以去掉listView自带的触摸时的背景颜色。  注意这个@null不起作用android:listSelector="@android:color/transparent"  android:divider="@android:color/transparent"  设置分割线不显示。

ListView 上字体按压下和松开后颜色的改变: 选中和不选中颜色的区别,像RadioButton的字体的颜色(check 选择时);

listview只能用enable: 属性为enable,做状态选择器时用。


ListView 上下滑动时如果出现黑色背景,改变的办法:

    android:cacheColorHint="#fff"    缓存隐藏颜色是强制改为白色。

再给ListView添加headView时,需要注意作为headView的布局文件的根部局不要将宽高写死。

更多相关文章

  1. Android中背景选择器
  2. zz浅谈android的selector,背景选择器
  3. 【Android】编写Drawable XML绘制底部带指示条的背景
  4. Android Studio App设置TextView文字内容大小颜色
  5. Android TextView 中如何使用第三方字体
  6. 去除或替换listview 默认的点击选中时的颜色

随机推荐

  1. android studio快捷键 for mac
  2. Android(安卓)Things之---Android(安卓)T
  3. Android(安卓)近百个项目的源代码,覆盖And
  4. Android(安卓)TextUtils类介绍
  5. SharedPreferences
  6. Android(安卓)Button
  7. Android布局属性全面剖析
  8. ImageView的属性android:scaleType,即Imag
  9. Android(安卓)WebView调起支付宝微信支付
  10. Android基于XMPP Smack Openfire开发IM【