안드로이드 gridview xml 다루는거
조회수 1449회
-----------activity_main.xml-------------
<GridView
android:id="@+id/gridView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:numColumns="7" />
<GridView
android:id="@+id/gridView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:numColumns="7" />
--------dialog_1.xml---------
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:weightSum="1">
<TextView
android:gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/tView1"/>
xml을 이렇게 작성했는데 이렇게 뜨네요. 월화수목금토일 표시하는 TextView의 height가 너무 커서 gridView까지도 위아래 높이가 저렇게 뜨는 것 같은데 이유가 뭘까요? 그리고 height를 싹 다 match_parent로 바꿨는데 위아래가 화면에 꽉 차질 않아요. 그 이유가 뭘까요?
댓글 입력