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. android 5.0系统 EditText控件
  3. zz浅谈android的selector,背景选择器
  4. Android(安卓)ListView 去除底色、选中色、阴影
  5. 【Android】编写Drawable XML绘制底部带指示条的背景
  6. Android中的Selector
  7. TextView 文字描边
  8. Android(安卓)Studio App设置TextView文字内容大小颜色
  9. android 中activity 属性说明

随机推荐

  1. android amlogic系统源码中去除屏保
  2. android 申请移动应用的签名生成方法
  3. android查看异常技巧
  4. Eclipse下android相关设置
  5. ProgressBar背景的改变
  6. android framework 低电量关机处理流程
  7. Android(安卓)开发技巧之Log发送UDP报文,S
  8. Android(安卓)滑动效果基础篇(四)—— Gall
  9. Flutter开始干系列-一个完整的登录实践
  10. android:windowSoftInputMode的说明