如何将整个背景页设为白色?我有一个listview并试图在xml中设置backgroundcolor白色,但它没有用.这些是我的xmls:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ListView
android:id="@+id/list" android:layout_width="fill_parent"
android:clickable="true" android:layout_height="fill_parent"></ListView>
Run Code Online (Sandbox Code Playgroud)
唯一真正变白的是:
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/naam" android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:textSize="16sp" >
</TextView>
Run Code Online (Sandbox Code Playgroud)
这是我的java代码:
public class Contactenlijst extends ListActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final HashMap<Integer, Personeel> personeelmap = new HashMap<Integer, Personeel>();
ArrayList<String> list = new ArrayList<String>();
// Get the data (see above)
JSONObject json = Database
.getJSONfromURL("http://fabian.nostradamus.nu/Android/getcontactinfo.php");
try {
JSONArray contactinfo = json.getJSONArray("contactlijst");
// Loop the Array
for (int i = 0; i < …Run Code Online (Sandbox Code Playgroud)