コードで GridView を使用しています。スペースに問題があります。これは私の問題です:
テキストが短い場合は問題ありませんが、長い場合は問題になります。私はこれを取得したい:
これは私のGridViewです:
<GridView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_margin="5dp"
android:layout_weight="1"
android:divider="@color/transparente"
android:horizontalSpacing="4dp"
android:longClickable="true"
android:numColumns="2"
android:scrollbars="none"
android:verticalSpacing="4dp" >
</GridView>
これは、GridView の要素の xml です。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:gravity="center_vertical"
android:paddingLeft="5dp" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="5dp"
android:paddingTop="2dp" >
<TextView
android:id="@+id/textView_title_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Text text text text text text"
android:textColor="@color/blanco"
android:textSize="@dimen/titulos" />
<TextView
android:id="@+id/textView_alarm_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Text text text text text text"
android:textColor="@color/blanco"
android:textSize="@dimen/contenido" />
<TextView
android:id="@+id/textView_alarm_days"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Text text text text text text"
android:textColor="@color/blanco"
android:textSize="@dimen/contenido" />
</LinearLayout>
</LinearLayout>
私は使用しようとしましたandroid: stretchMode = "spacingWidth", "columnWidth" and android: verticalSpacing = "4DP"
...しかし成功しませんでした
答えを探しましたが、助けになるものが見つかりません
どんな助けにも感謝します
感謝と敬意