내 레이아웃에는 8 개의 셀만 있습니다.
화면에서 사용할 수있는 모든 공간을 셀로 나누고 싶습니다. 이것이 가능한가?화면 높이에 따라 GridView 셀의 높이를 어떻게 설정할 수 있습니까?
이 내있는 gridview 레이아웃입니다 :
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/dataGrid"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10px"
android:verticalSpacing="10px"
android:horizontalSpacing="10px"
android:numColumns="2"
android:gravity="fill" />
그리고이 항목의 레이아웃입니다 :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="6dip" >
<TableRow
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textColor="#E00000"
android:textStyle="bold"
android:gravity="left"
android:textSize="16dip"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textColor="#000000"
android:textStyle="normal"
android:gravity="right"
android:textSize="12dip"/>
</LinearLayout>
</TableRow>
</LinearLayout>
exuse me 그러나 약 3 일 동안 인터넷 연결이 끊어졌습니다. 어쨌든 gridview가 모든 안드로이드 장치를 기반으로 화면의 모든 공간을 나누고 싶습니다.이 솔루션은 전혀 좋지 않습니다. 감사. 문안 인사 –