2011-01-23 3 views
0

그래서 두 개의 탭이있는 탭 활동이 있습니다. 이들 밑에 나는 두 번째 견해를 갖고 싶습니다. 현재 뷰를 마지막에 넣을 수는 있지만 현재 표시된 탭의 끝에있는 것과는 여전히 겹칩니다. 누구든지 콘텐츠의 끝 부분을 겹치기보다는 두 번째보기를 탭 아래에 가져 오는 방법에 대한 아이디어가 있습니까?Android : TabActivity 아래에보기 추가

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 

    <TabHost android:id="@android:id/tabhost" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 

     <LinearLayout android:id="@+id/linearLayout" 
      android:orientation="vertical" 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent"> 

      <TabWidget android:id="@android:id/tabs" 
       android:layout_width="fill_parent" 
       android:layout_height="wrap_content" /> 

      <FrameLayout android:id="@android:id/tabcontent" 
       android:layout_width="fill_parent" 
       android:layout_height="fill_parent"/> 

     </LinearLayout> 
    </TabHost> 

    <RelativeLayout android:id="@+id/InnerRelativeLayout" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true"> 

     <TextView android:id="@+id/EndView" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:text="At the end of the screen"/> 

     </RelativeLayout> 
</RelativeLayout> 

답변

0

사용 android:below="@id/tabhost" : 그 내용은

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 
    <TabHost ...> 
     ... 
    </TabHost> 

    <RelativeLayout android:id="@+id/InnerRelativeLayout" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     android:below="@id/tabhost"><!-- LOOK HERE --> 

     <TextView android:id="@+id/EndView" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:text="At the end of the screen"/> 

     </RelativeLayout> 
</RelativeLayout> 
+0

내가 "얻을 오류 : 그래서보기 그냥 텍스트 뷰의 경우, 예를 들어

, 내 레이아웃은 다음과 같습니다 없음 자원 식별자 속성에 대한 발견 패키지 'android'에서 'below'. "android : layout_below ="@ + id/tabhost ""를 원하십니까? 그렇게하면 텍스트 뷰가 여전히 겹칩니다. – Acet

관련 문제