7

GridView で画像を表示するコードを作成しましたが、すべての画像の下部にテキストを表示したいと考えています。

そして、次のようにグリッドを表示したい:

ここに画像の説明を入力

しかし、このようになっています[画像のテキストも表示したい]:

ここに画像の説明を入力

main.xml:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >
    <GridView
        android:id="@+id/gridview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:verticalSpacing="0dp"
        android:horizontalSpacing="0dp"
        android:stretchMode="columnWidth"
        android:numColumns="2" 
        />
</FrameLayout>
4

1 に答える 1