я использую этот метод LINK для создания recyclerview с помощью GridLayoutManager для столбцы autospan, но мне не удалось создать квадратный фиктивный макет для просмотра держателя. Я намерен имитировать галерею с помощью recyclerview,
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="100dp"
android:background="@color/white"
android:orientation="vertical"
android:padding="1dp">
<ImageView
android:id="@+id/txt"
android:layout_width="match_parent"
android:layout_height="100dp"
android:adjustViewBounds="true"
android:scaleType="centerCrop"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="20dp"
android:layout_gravity="center_horizontal|bottom"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true">
<TextView
android:id="@+id/card_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="end"
android:singleLine="true"
android:text="folder"
android:textSize="12dp"
android:textStyle="bold"/>
</FrameLayout>