It does not go out normally to display images in the GridLayoutManager. wrap_content does not work. Images are displayed by the Universal Image Loader.

There are several options for displaying images of 6, 7 or 8 images.

For example for 8 images: enter image description here

There is a lot of empty space under GridLayoutManager. I tried this solution But the result is the same. Don't even know what else to try.

<android.support.v7.widget.RecyclerView android:id="@+id/sharedGridLayout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" local:layout_behavior="@string/appbar_scrolling_view_behavior" android:layout_below="@id/expandTextView" /> 

Config for Universal Image Loader

  var options = new DisplayImageOptions.Builder() .ShowImageOnLoading(Resource.Drawable.shared_gray_empty_photo) .ResetViewBeforeLoading(true) .ConsiderExifParams(true) .CacheInMemory(false) .CacheOnDisk(true) .Build(); 

    1 answer 1

    In version 23.2.0, everything works fine, in the versions above, some kind of nonsense has begun. Replace the line with this one.

     compile 'com.android.support:recyclerview-v7:23.2.0' 
    • Thanks, it works (if you scroll slowly), but not well enough, if I quickly scroll, then the height of the RecyclerView is greater or less than the height of the photos - it does not calculate correctly. What else can you do or try? - Igor Levkivskiy
    • But I do not know this anymore .. - Flippy