改变listview的item项的颜色、自定义expandlistview的group、item的颜色,改变、调用android.R.layout参数
2014-07-13 00:36
375 查看
mAdapter = new SimpleExpandableListAdapter(
this,
groupData,
R.layout.expand_item,
new String[] { NAME, IS_EVEN },
new int[] { android.R.id.text1, android.R.id.text2 },
childData,
//如果是simple_expandable_list_item2,则字显示不全。
android.R.layout.simple_list_item_2,
new String[] { NAME, IS_EVEN },
new int[] { android.R.id.text1, android.R.id.text2 }
);
重写android.R.layout.simple_expandlist_item_1,(位置在e'xternal libary 里res文件夹里的layout里,把它的源码考备,在工程内的res新建一个layout,然后拷过去,加上backgruod的颜色,再调用就可以了)
this,
groupData,
R.layout.expand_item,
new String[] { NAME, IS_EVEN },
new int[] { android.R.id.text1, android.R.id.text2 },
childData,
//如果是simple_expandable_list_item2,则字显示不全。
android.R.layout.simple_list_item_2,
new String[] { NAME, IS_EVEN },
new int[] { android.R.id.text1, android.R.id.text2 }
);
重写android.R.layout.simple_expandlist_item_1,(位置在e'xternal libary 里res文件夹里的layout里,把它的源码考备,在工程内的res新建一个layout,然后拷过去,加上backgruod的颜色,再调用就可以了)
相关文章推荐
- ListView 自定义item布局 android.widget.LinearLayout$LayoutParams
- <学习笔记>Android ListView 通过指定position改变item颜色
- 自定义ListView的点击Item项后进入另一个activity背景色改变在pressed或selected等状态时的颜色
- Android开发实现ListView点击item改变颜色功能示例
- ListView 自定义item布局 android.widget.LinearLayout$LayoutParams
- 如何改变Android中 ListView的item被选中的颜色
- [Android]ListView 设置焦点与选中时改变item颜色
- android listView 点击Item的时候,改变文字颜色和背景色
- AndroidListView点击Item的时候 改变文字颜色和背景色
- Android ListView 点击Item的时候,改变文字颜色和背景色
- Android 代码模拟ListView item的点击事件并且改变背景颜色(笔记)
- ListView 点击Item的时候,改变文字颜色和背景色
- 自定义Adapter,通过复写getView方法,实现ListView中item背景颜色变化
- Android ListView 如何 更改字体颜色,字体类型等参数
- android 自定义 radiobutton 文字颜色随选中状态而改变
- 由ListView改变Item背景问题引出的对自定义Adapter的反思
- android上改变listView的选中颜色
- Android改变ListView选中行字体颜色
- ListView 点击Item的时候,改变文字颜色和背景色
- ListView中的Item中的文字改变颜色??