Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to make a linear layout horizontall scrollable

My application containing different layouts.one of them is a linear layout.it's content is dynamically adding.i want to make this layout horizontally scrollable.for this i have put my layout in a scroll view.but still it s not scrolling...given below is my code

 <LinearLayout android:id="@+id/scoreballparent_layout"
  android:layout_height="wrap_content"
  android:orientation="horizontal"
   android:layout_width="fill_parent"
  android:layout_above="@+id/score_layout">
  <ScrollView android:layout_height="wrap_content" 
  android:id="@+id/scrollView1" 
  android:layout_width="fill_parent" 
  >
      <LinearLayout android:layout_width="fill_parent" 
      android:id="@+id/scoreball_layout" 
      android:layout_height="wrap_content"
      android:isScrollContainer="true" 
      android:scrollbars="horizontal">

         </LinearLayout>
     </ScrollView>
</LinearLayout>
like image 288
star angel Avatar asked Jan 20 '23 12:01

star angel


1 Answers

Use HorizontalScrollView instead

Also your layout will become scrollabe after its contect can't fit layout area.

like image 200
woodshy Avatar answered Jan 29 '23 15:01

woodshy