2014-04-14 3 views
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 나는이 레이아웃을 탭이있는 조각 안에 팽창 시켰습니다.

피씨 나는 안드로이드 디자인을 배우고 있습니다. 감사.

+0

그리드 아이템의'xml' 문제와 레이아웃을 보려면 스크린 샷을 추가하십시오. – gio

+0

gridview가 아니고 gridLayout이 있습니다. – ComeIn

답변

0

나는

  1. 안드로이드 기본 액션 바의 조합, 지원 라이브러리에서
  2. tabhost을 사용했다.

위의 질문에 대한 답변은 구현을위한 다른 옵션이 없었기 때문에 콘텐츠의 부모 노드에 패딩 하단을 적용하면 작동했습니다.

나는 그것은 여분의 패딩없이을 열심히 APPCOMPAT v7.21 (또는 21)에 도구 모음과 다른 조합을 시도했다, 그래서 나는 문제, 액션 바 또는 tabhost를 일으키는 사람 조사 할 시간을 얻을 타격을받지.

~ 도움을 받으십시오.