I have a RecyclerView with horizontal GridLayoutManager. In my app it is possible to change column height. If I increase the height of column everything works as expected:
before:
after:
but if I decrease the height of column an empty space show up:
cell xml:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/one_day_linearLayout"
android:layout_width="match_parent"
android:layout_height="200dp"
android:minHeight="200dp"
>
<android.support.v7.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/one_day_recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="2dp"
android:background="@color/colorAccent"
/>
I'm changing height directly on the ViewHolders. What should I do for remove this space between columns?