gridview - Grid View with Horizontal scrolling in android -
i want show images in gridview , want show them in single row. no of columns in gridview equal no of images. want when no. of images more , taking width more screen size, want enable horizontal scrolling gridview, images visible.
how can achieve this, please me if have idea. have tried gallery widget not giving me desired results.
here library called two way grid view
can use gridview
in both orientations (horizontal , vertical)
link library:
https://github.com/jess-anders/two-way-gridview
sample usage:
<?xml version="1.0" encoding="utf-8"?> <com.jess.ui.twowaygridview xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:background="#e8e8e8" android:id="@+id/gridview" android:layout_width="fill_parent" android:layout_height="fill_parent" app:cachecolorhint="#e8e8e8" app:columnwidth="80dp" app:rowheight="80dp" app:numcolumns="auto_fit" app:numrows="auto_fit" app:verticalspacing="16dp" app:horizontalspacing="16dp" app:stretchmode="spacingwidthuniform" app:scrolldirectionportrait="vertical" app:scrolldirectionlandscape="horizontal" app:gravity="center"/>
i hope solves problem.
p.s: can check out sample provided library further usage demo.
Comments
Post a Comment