Reputation: 1766
I am able to query all the images from my device and display them in a linearlayout with a recyclerview but actually i want to display image thumbnails like its shown in android gallery app where the image size is different but they somehow adjust to fit and cover all space
plz check the image link as i can't post it in my question because of low reputation
Upvotes: 0
Views: 56
Reputation: 2457
For creating a grid with like your requirement you can get concept from link there are lot of custom grid available on github but this is most common find it here
This is example for how to define in xml
<com.etsy.android.grid.StaggeredGridView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/grid_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:item_margin="8dp"
app:column_count="@integer/column_count" />
Upvotes: 1