0

I am trying to implement StaggeredGridView in 7 inch Samsung Tablet, but it is only displaying 3 items out of 9 when column count is set to 2. It displays 4 items out of 9 when column count is set to 3.

The same thing works fine in phones but in 7 inch tablet it replicates the above behaviour.

Could you please help me with the same and tell me the workaround.

Below is the xml file

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<ImageView
    android:id="@+id/imgDashboard"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:adjustViewBounds="true"
    android:src="@drawable/dashboard_image" />

<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/list_dashboard"
    android:layout_below="@+id/imgDashboard"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:item_margin="0dp" />


</RelativeLayout>

0 Answers0