我能够使用自定义适配器设置一个listview显示正确的输出。现在我想改变每个listview项目的背景到一个渐变..它是如何做到的?更改ListView项目背景渐变
我的文件...
activity_main.xml中....主要XML文件
MainActivity.java ....主要活动
Item.java ....项目选择方法
ItemAdaptor ....定制适配器
list_item.xml .....项(TextView的)造型
我已经创建了我的梯度代码是一样..
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="#FFFAFAFA"
android:centerColor="#FFFFFFFF"
android:endColor="#FFFAFAFA"
android:angle="90"/>
</shape>
还我怎么能更改分隔符的颜色,整个列表视图的背景颜色..
在list_item.xml中放置android:background =“@ drawable/yourgraidentfilename” – Riskhan