android kolor tła listactivity
Jak mogę ustawić kolor tła listactivity? Mogę ustawić kolor tła elementów widoku listy, ale nie otwór widoku aktywności (patrz czarna część na dole obrazu). Jak mogę to osiągnąć?
XML ListActivity wygląda tak:
<code><?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="5dp" android:background="@color/darkbluelogo" > <ImageView android:id="@+id/list_image" android:layout_width="48dip" android:layout_height="48dip" android:contentDescription="@id/list_image" /> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp" android:background="@color/darkbluelogo" android:scrollingCache="false" android:cacheColorHint="#00000000" > <TextView android:id="@+id/title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@+id/title" > </TextView> <TextView android:id="@+id/datetime" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@+id/datetime" > </TextView> </LinearLayout> </LinearLayout> </code>
I tak to wygląda na urządzeniu:
ROZWIĄZANIE:
Musiałem dodać styl XML i dodać go do aktywności w pliku AndroidManifest.xml
To była prawidłowa odpowiedź:https://stackoverflow.com/a/10426474/1306012