Reputation: 987
I am facing a problem where using custom background color for RelativeLayout, is not working. The problem does not occur when I use a primary color (like RED). Any pointers will be appreciated.
I am pasting my view details here. It may not make sense as the map is not visible with this. But please ignore that bit. My concern is the background color.
What works :
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:focusable="true"
android:focusableInTouchMode="true"
android:keepScreenOn="true" >
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="@string/map_key"/>
<RelativeLayout
android:id="@+id/friendListBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FF0000">
<Button
android:id="@+id/showAttendeesButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:drawableTop="@drawable/show_attendees_button" />
</RelativeLayout>
</RelativeLayout>
What doesn't work :
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:focusable="true"
android:focusableInTouchMode="true"
android:keepScreenOn="true" >
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="@string/map_key"/>
<RelativeLayout
android:id="@+id/friendListBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F0F3F6">
<Button
android:id="@+id/showAttendeesButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:drawableTop="@drawable/show_attendees_button" />
</RelativeLayout>
</RelativeLayout>
Any pointers on this would be very appreciated!
Upvotes: 0
Views: 1496