У меня есть требование, в котором я хочу показать несколько изображений в одной строке с возможностью горизонтальной прокрутки.
Я попытался поместить gridview внутри горизонтального прокрутки и установить число столбцов gridview для количества изображений. Но этот подход не помогает.
Пожалуйста, предложите что-нибудь?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:background="@android:color/white" android:clickable="true"
>
<HorizontalScrollView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:scrollbars="none"
    android:layout_margin="1dp"
    android:fillViewport="false"
    android:layout_below="@+id/tvHis">
    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        >
    <GridView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/listViewHis"
        android:layout_below="@+id/tvHisPosts"
        />
    </LinearLayout>
</HorizontalScrollView>
</LinearLayout>