GridView
各行に正確に 2 つの画像が表示され、画像が画面の幅 (パディングとマージンを除く) に収まるが、最大の幅と高さ (たとえば 1 インチ) があるというこれらの制約で、いくつかの画像のサムネイル (画像は正方形) を表示し
たい質問を読みましたが、問題を解決できません。手伝ってくれませんか。
GridView xml:
<GridView
android:id="@+id/gridview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:horizontalSpacing="10dp"
android:numColumns="2"
android:scrollbarStyle="outsideOverlay"
android:scrollbars="vertical"
android:stretchMode="columnWidth"
android:verticalScrollbarPosition="right"
android:verticalSpacing="10dp"
android:padding="10dp" />
GridView アイテム xml:
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/thumbnail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:maxWidth="72pt"
android:maxHeight="72pt"
/>
私が欲しいものを正確に示すために2枚の写真を追加しました
最初の画像 (4 インチの携帯電話) はまさに私が望むものですが、画像 2 のように画面の幅が大きくなるにつれて (タブレットまたは横向き)、画像項目を拡大したいと考えています。(最大幅サイズがあるため、このモードでの結果は画像 1 に描かれている携帯電話と同じではないことに注意してください)