This one is weird. I have a list view that is a part of Relative Layout. I have set a background to this Relative Layout and made list view background as transparent.
Now, everything was working great till this morning. I could see the whole screen covered with my custom background even if there is just one row in my list view.
Then, I got update on Verizon Motorola Droid X for 2.3.3 (it was 2.2 before). Once it was updated, I started my app again and now here is what happens.
If my list view has only one row, I see a white area below it and not my custom background. But if it has say 100 rows and thus covers the whole screen I won't see that weird white background. My relative layout has width and height set to "fill_parent".
I have posted my XML at the bottom. Has anyone else faced this problem or I am making some really stupid mistake.
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:background = "@drawable/background"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView android:id = "@+id/listQueue"
android:layout_width = "fill_parent"
android:layout_height = "fill_parent"
android:layout_below = "@id/homeScreenBanner"
android:background="@android:color/transparent"
android:divider="@drawable/separator"
android:scrollingCache="false"/>
</RelativeLayout>
EDIT:
I think I have found the solution to this problem:
Changed the layout_height attribute to wrap_content and it worked like a charm. :)
Following the changed line.
android:layout_height = "wrap_content"
android:layout_below = "@id/homeScreenBanner"
? where's your homeScreenBanner is situated?... you just remove that and try.. – Nirav Dangi