Reputation: 423
In my first screen shot you can see expended listview at top and textview placed at below next to expended listview. But if you look at my second screen shot, as the listview adds more items textview place at the bottom does not appear.
My layout code is :
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/form_view"
>
<LinearLayout
android:id="@+id/relativeLayout1"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Spinner
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="2"
android:id="@+id/spinnerSemester" />
<Button
android:id="@+id/graph_button"
android:layout_width="0dip"
android:layout_weight="0.7"
android:layout_height="wrap_content"
android:text="Chart" />
</LinearLayout>
<ExpandableListView
android:id="@+id/lv_attendance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_weight="1"
android:cacheColorHint="#00000000"
>
</ExpandableListView>
<TextView
android:id="@+id/TV_note"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/lv_attendance"
android:paddingLeft="10dp"
android:text="[NOTE : The data displayed here is for advance information only. Please check with the college office/department concerned for the final and certified data. In case of discrepancies, the data maintained in the college records will be deemed to be the final one.]"
android:layout_marginTop="10px"
android:textSize="13sp" />
</LinearLayout>
Thanks, Nandakishore P
Upvotes: 0
Views: 274
Reputation: 452
Dont use android:layout_below="@+id/lv_attendance", its creating problem, use alignParentBottom instead.
Upvotes: 0
Reputation: 364
consider specifyig android:layout_weight to the views, also encasing that text view in a framelayout or linearlayout
Gods, I hate layout...
Upvotes: 0
Reputation: 9700
Try as below...
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/form_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/relativeLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Spinner
android:id="@+id/spinnerSemester"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="2" />
<Button
android:id="@+id/graph_button"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:text="Chart" />
</LinearLayout>
<ExpandableListView
android:id="@+id/lv_attendance"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:cacheColorHint="#00000000" >
</ExpandableListView>
<TextView
android:id="@+id/TV_note"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:paddingLeft="10dp"
android:text="[NOTE : The data displayed here is for advance information only. Please check with the college office/department concerned for the final and certified data. In case of discrepancies, the data maintained in the college records will be deemed to be the final one.]"
android:textSize="13sp" />
</LinearLayout>
Upvotes: 1