내 코드에서 GridView를 사용하고 있습니다. 나는 공간에 문제가있다. 이 내 문제입니다 :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"
를 사용하십시오 ... 성공하지 못했습니다.
나는 답을 검색,하지만 난 당신이 실제 최대 크기를 선언해야 도움을
감사와 관련
요소의 기본 LinearLayout의 layout_height를 "wrap_content"대신 "match_parent"로 설정하면 어떨까요? – mihail
나는 이미 그 변화를 시도했지만 효과가 없다. – Sergio76