1

How to add horizontal scroll view for grid view. I have tried but its not working. is there any solution???

<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content"
android:paddingBottom="60dp"
> 
<GridView  
android:id="@+id/gridview1"
android:layout_width="wrap_content" 
android:layout_height="wrap_content"
android:columnWidth="90dp"
android:numColumns="8"
android:verticalSpacing="10dp"
android:horizontalSpacing="10dp"
android:stretchMode="columnWidth"
android:gravity="center"
android:paddingBottom="60dp" />

</HorizontalScrollView> 
yuva ツ
  • 3,707
  • 9
  • 50
  • 78
  • "but its not working...." Post some details about that. – S.D. Aug 16 '13 at 10:48
  • why do you need to add a gridview in horizontalscrollview? to make it scroll? – kvh Aug 16 '13 at 10:52
  • Here is the duplicate... http://stackoverflow.com/questions/15919060/how-to-make-grid-view-scroll-horizontally-not-vertically-in-android – Hariharan Aug 16 '13 at 10:54

1 Answers1

0

Just use ViewPager to hold your gridviews to enabling horizontal scrolling

kvh
  • 2,118
  • 19
  • 29