how stretch listview in given code match grandparents frame(parent = linearlayout, grandparent = scrollview). far, listview stretches upto 3 items only. :(
here's code:
<scrollview android:layout_span="2" android:layout_width="fill_parent" android:layout_height="90pt"> <linearlayout android:id="@+id/linearlayout1" android:orientation="vertical" android:layout_span="2" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:layout_height="match_parent"> <textview android:id="@android:id/empty" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:typeface="monospace" android:layout_height="0dip" android:text="@string/immu_no_list_data_text" android:layout_weight="1.0" android:textsize="20dp"></textview> <listview android:layout_weight="1.0" android:layout_width="wrap_content" android:id="@+id/list_immu" android:layout_gravity="center_vertical" android:layout_height="fill_parent"></listview> </linearlayout> </scrollview>
any particular reason why need scrollview?
listview , scrollview don't play together. list view handle scrolling itself. try:
<linearlayout android:layout_width="fill_parent" android:layout_height="fill_parent"> <textview ... /> <listview android:layout_width="fill_parent" android:layout_height="fill_parent" /> </linearlayout>
Comments
Post a Comment