How to implement ScrollView for my layout containing both text, image and ListView -


i'm trying add scrollview layout containing various textviews, imageview , listview. reason why want able scroll because text , image takes space , leaves little listview.

i have no idea on how implement tough. heres xml code layout.

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:background="@android:color/white"     android:orientation="vertical" >      <imageview         android:id="@+id/pubinfoimg"         android:layout_width="fill_parent"         android:layout_height="wrap_content" />      <linearlayout         android:layout_width="fill_parent"         android:layout_height="wrap_content" >          <textview             android:id="@+id/pubinfowelcome"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_weight="1"             android:paddingleft="10dp" />          <textview             android:id="@+id/pubinfotapsno"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_weight="5"             android:padding="10dp" />     </linearlayout>      <view         android:layout_width="fill_parent"         android:layout_height="0.7dip"         android:layout_centervertical="true"         android:background="@android:color/holo_blue_dark" />      <textview         android:id="@+id/pubinfoaddress"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:paddingleft="10dp" />      <textview         android:id="@+id/pubinfourl"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:paddingleft="10dp" />      <textview         android:id="@+id/pubinfoopenhours"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:paddingleft="10dp" />      <listview         android:id="@+id/tapslistview"         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:background="#bababa"         android:divider="@android:color/transparent"         android:dividerheight="0.0sp"         android:footerdividersenabled="true"         android:headerdividersenabled="true" />      </linearlayout> 

if u want set imageview or textview @ end of list u can use listview.addfooterview(footerview); add view in foooter of listview in android


Comments