2012-03-09 3 views
0

私はこのようなTabHost/TabWidgetとレイアウトを持っている:レイアウトをTabWidgetと重ならないようにする方法は?

enter image description here

青いボックスがでframeLayoutです。 FrameLayout内にRelativeLayoutがあります。 RelativeLayoutはwidth/heightのfill_parentにあり、FrameLayoutはfill_parentの幅と445dpの高さです。これは、Parentの下部からTabWidgetの下部までの高さであるためです。

FrameLayoutを常にになるように設定するにはどうすればよいですか?(私はそれはそれはで表示されていますどんなDPI /画面サイズに合わせてサイズを変更する必要があります)

のxml:

<?xml version="1.0" encoding="utf-8"?> 
<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"> 

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

<FrameLayout 
    android:id="@android:id/tabcontent" 
    android:layout_width="fill_parent" 
    android:layout_height="445dp" 
    android:layout_gravity="bottom" > 

    <RelativeLayout 
android:id="@+id/layout" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:layout_gravity="bottom" > 

    </RelativeLayout> 


</FrameLayout> 




</TabHost> 

答えて

1

これは動作します....

android:layout_marginTop="63dp" 
android:layout_height="fill_parent" 
+0

が働いていたこと、ありがとう。 – Cole

関連する問題