I have the following simple layout
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<RelativeLayout
android:id="@+id/answerMainFrame"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/background"
android:isScrollContainer="true"
android:onClick="toAnswer" >
<ImageView
android:id="@+id/answer_img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:contentDescription="@string/question_img_cd" />
<TextView
android:id="@+id/answer"
style="@style/Question"
android:layout_below="@id/answer_img" />
</RelativeLayout>
</ScrollView>
but sometimes, depending on the size of the ImageView and TextView, it doesn't fill the height of the screen. That's ok. I just want the rest of the screen to be white instead of black.
I've tried setting android:background="@color/background"
, which is white, to the ScrollView but I get the same.
I've also tried setting android:layout_height="wrap_content"
to the Relativelayout but it shows a warning.
What should I do?
Thanks.