I have two linearlayouts, each occupy the 50% of total space.
Inside of them there are different views and I don't understand why the horizontalScrollView1
and the listView1
(look the ids) are not visible.
The two views should expand to fill the space remaining in their parent.
What I'am doing wrong?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_height="0dp"
android:layout_weight="1"
android:layout_width="match_parent">
<HorizontalScrollView
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<HorizontalScrollView
android:layout_height="0dp"
android:layout_weight="1"
android:layout_width="match_parent"
android:id="@+id/horizontalScrollView1">
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/list"/>
</HorizontalScrollView>
</LinearLayout>
<LinearLayout
android:layout_height="0dp"
android:layout_weight="1"
android:layout_width="match_parent" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Hello!!!" />
<ListView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:id="@+id/listView1"/>
</LinearLayout>
</LinearLayout>