0
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<GridView
android:id="@+id/gridview_gallery_mine"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginBottom="10sp"
android:background="@color/background"
android:gravity="center"
android:horizontalSpacing="4dip"
android:numColumns="4"
android:padding="4dip"
android:stretchMode="columnWidth"
android:verticalSpacing="4dip" />
<RelativeLayout
android:id="@+id/empty_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" >
<TextView
android:id="@+id/textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/empty_list" />
</RelativeLayout>
</RelativeLayout>
문제는 그리드의 마지막 행이 절반으로 절단되고 있다는 것이다을 다음과 같이 그리드 레이아웃을 유지하는 레이아웃이 차단된다. 마지막 행이 절반 밖에 보이지 않는다는 것을 의미합니다. gridview 및 해당 부모 (RelativeLayout) 패딩, 여백을 시도했다 그러나 아무것도 작동합니다. BTW 나는이 레이아웃을 탭이있는 조각 안에 팽창 시켰습니다.
피씨 나는 안드로이드 디자인을 배우고 있습니다. 감사.
그리드 아이템의'xml' 문제와 레이아웃을 보려면 스크린 샷을 추가하십시오. – gio
gridview가 아니고 gridLayout이 있습니다. – ComeIn