Android add a ListView inside of ScrollView -


i know bad practice "don't put listview scrollview" since listview has it's own scroll. however, have couple of other items (buttons , textviews) additional listview. those, need use scrollview. found solution (http://nex-otaku-en.blogspot.com/2010/12/android-put-listview-in-scrollview.html) prevent collapsing listview. but, said, need scrollview encapsulates items on xml form. have added xml code, please guide how achieve this.

   <scrollview         xmlns:android="http://schemas.android.com/apk/res/android"         android:layout_width="match_parent"         android:layout_height="match_parent" >   <linearlayout       android:layout_width="match_parent"     android:layout_height="match_parent"     android:orientation="vertical" >      <listview         android:id="@+id/listview1"         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:choicemode="singlechoice">     </listview>       <linearlayout         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:orientation="horizontal" >      <button         android:id="@+id/button1"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:text="button1" />       </linearlayout>         <textview     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:text="@string/longtext" />  </linearlayout> </scrollview> 

listview scrollable. not put listview inside scroll view.

move listview outside scorllview. can add header , footer listview.

check video google

https://www.youtube.com/watch?v=wdbm6wveo70


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -