以下代码几乎与我想要实现的内容相同。Android。设置ListView的背景图像
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg">
<ListView android:layout_height="wrap_content" android:id="@+id/levelList" android:layout_width="match_parent" android:layout_alignParentLeft="true"></ListView>
</RelativeLayout>
我想为整个ListView设置背景图像。此代码的问题是背景图像在滚动时闪烁或消失。
我使用sdk 2.2和一个模拟器来运行程序。
您是否尝试将bg设置为listview? – Calvin 2012-03-22 16:08:20
是的,并得到了相同的结果 – Gargo 2012-03-23 06:03:02