2011-05-09 6 views
0

내 응용 프로그램에는 탭 막대가 있습니다. 여기에는 목록보기가 표시되는 네 개의 탭이 있습니다. 그것은 잘 동작했지만 지금은 화면의 하단에있는 탭 막대를 이동해야합니다. 보기 하단에 탭 표시 줄을 표시하도록 코드를 변경하면 목록보기가 전체 화면으로 표시되어 탭 표시 줄과 겹쳐집니다. 여기 안드로이드에서보기 하단에 탭 막대를 추가 할 때의 문제

<?xml version="1.0" encoding="utf-8"?> 
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 
      android:id="@+id/mainlayout" 
      android:layout_height="fill_parent" 
      android:layout_width="fill_parent" 
      android:orientation="vertical" > 
    <TabHost xmlns:android="http://schemas.android.com/apk/res/android" 
     android:id="@android:id/tabhost" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:orientation="vertical" 
     android:background="#000000"> 

     <RelativeLayout 
      android:orientation="vertical" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:padding="5dp"> 

      <TextView xmlns:android="http://schemas.android.com/apk/res/android" 
        android:id="@+id/Label" 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:text="Credit Balance" 
        android:background = "#55000000" 
        android:textColor = "#FF0033" 
      /> 

      <TabWidget 
        android:id="@android:id/tabs" 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        **android:layout_alignParentBottom = "true"**/> 
      <FrameLayout 
        android:id="@android:id/tabcontent" 
        android:layout_width="fill_parent" 
        android:layout_height="fill_parent" 
        android:padding="5dp" /> 
     </RelativeLayout> 
    </TabHost> 
</FrameLayout> 

나는 다음과 같은 코드

tabHost.addTab(tabHost.newTabSpec(NEW_TAB).setIndicator(NEW) 
      .setContent(new Intent(this, NEWActivity.class))); 

사람이에 대한 해결책을 제안 할 수 있습니다하십시오 4 개 각각의 탭에서 4 개 목록보기를 추가하고 샘플 코드인가?

감사

답변

3

은 FrameLayout이이

android:layout_above="@android:id/tabs" 

라인을 추가하고 좋은 똑바로 answer.Its가 잘 작동과

android:layout_alignParentBottom = "true" 

TabWidget에서

+0

감사 인 Sujit와. – Rishi

+0

+1 감사합니다. 한 시간 동안이 것을 알아 내려고 노력했습니다. –

관련 문제