Android 更改列表视图的背景色
有人能帮我更改列表视图的背景色吗?。我是android新手,我真的需要知道这一点。任何帮助都将不胜感激Android 更改列表视图的背景色,android,Android,有人能帮我更改列表视图的背景色吗?。我是android新手,我真的需要知道这一点。任何帮助都将不胜感激 谢谢 这是否有帮助,例如: <ListView android:id="@+id/rssListView" android:background="#7700CC00" android:layout_height="wrap_content" android:layout_width="match_parent" /> ?例如: <ListVie
谢谢 这是否有帮助,例如:
<ListView android:id="@+id/rssListView"
android:background="#7700CC00"
android:layout_height="wrap_content"
android:layout_width="match_parent" />
?例如:
<ListView android:id="@+id/rssListView"
android:background="#7700CC00"
android:layout_height="wrap_content"
android:layout_width="match_parent" />
?您可以使用ListView的setBackgroundColor()方法。您可以使用ListView的setBackgroundColor()方法。实际上,我已经在Java Android中创建了一个列表。我想通过Java代码更改背景颜色。实际上,我已经在Java Android中创建了一个列表。我想通过Java代码更改背景颜色。请进行编辑,使文本不全部位于代码块中。请进行编辑,使文本不全部位于代码块中。但此方法有一个int参数。颜色编号从#开始。它给出了一个错误。在代码中,颜色值也可以用十六进制格式给出,但只需将#替换为0x即可。您还可以使用color类设置颜色:setBackgroundColor(color.BLACK);但是这个方法有一个int参数。颜色编号从#开始。它给出了一个错误。在代码中,颜色值也可以用十六进制格式给出,但只需将#替换为0x即可。您还可以使用color类设置颜色:setBackgroundColor(color.BLACK);或者别的什么。