Layout:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<GridView
android:id="@+id/galleryImage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:numColumns="6"
android:scrollbars="horizontal" >
</GridView>
</LinearLayout>
Code:
myGV= (GridView) findViewById(R.id.galleryImage);
listImage = new profileAdapter(this, R.layout.layoutimage);
myGV.setAdapter(listImage);
I have set number columns by value of listImage
myGV.setNumColumns(listImage.getCount());
Why are horizontal scrollbars of Gridview not working?