<LinearLayout
android:id="@+id/layout_question_detail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:visibility="gone">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="55dp"
>
<Button
android:id="@+id/btn_question_backButton"
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/backicon_round"/>
<TextView
android:id="@+id/text_question_detail_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:textColor="@color/color_green"
android:text="Error"
android:textSize="19dp"
/>
</RelativeLayout>
<ImageView
android:id="@+id/image_question_detail_image"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:scaleType="centerCrop"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
android:layout_weight="2">
<TextView
android:id="@+id/text_question_detail_userComments"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dp"
android:layout_marginTop="10dp"
android:layout_weight="1"
android:layout_marginBottom="25dp"
/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="3">
<ListView
android:id="@+id/list_question_detail_expComments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@android:color/transparent"
android:dividerHeight="10dp"></ListView>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
Now, I set layout for title on the top. Then, a Imageview, a textview and a listview follow below this layout, and only 1 textview is inside listview. listview can vary in size.
The problem is, if the size of the listview is very big, I can only scroll the screen assigned to listview. But, I want scroll the entire screen.
To solve this problem, I added scrollview outside of the first linearlayout. However, It didn't work.(the imageview disappeared)
What can I do?