私はAndroid開発に慣れていない相対性理論ですが、私はすぐに追いつくと思います。私はソフトボールチームのために作ったアプリを作り直しています。以前はGoogleのAppInventorを使用していましたが、多くの欠点に遭遇したため、現在Eclipseを使用して再作業を試みています。
とにかく、要点まで。LinearLayoutに余分なパディングが追加されているようですが、どこから来ているのかわかりません。
TabHostを使用して、上部にタブを作成しています(GoogleのTabsの例の修正バージョン)。
レイアウトXML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_linlay_parent"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<TabHost
android:id="@android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<RelativeLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
>
<!-- Allow the "Tabs" to scroll horizontally -->
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:scrollbars="none"
>
<!-- The "Tabs" widget -->
<TabWidget
android:id="@android:id/tabs"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#000000"
/>
</HorizontalScrollView>
<!-- Provide the "Content" the ability to vertically scroll -->
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="65dp"
>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<LinearLayout
android:id="@+id/tabdata"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
</LinearLayout>
</FrameLayout>
</ScrollView>
</RelativeLayout>
</TabHost>
</LinearLayout>
問題はandroid:layout_marginTop="65dp"
ScrollViewのにあると思いますが、削除するとタブが消えます(タブコンテンツがその上にオーバーレイされていると想定しています)。
最後に、私が経験していることの例を示すスクリーンショットを示します(XML文字列を無視しますが、それでもその部分をマッサージする必要があります。データを使用して例を示したかっただけです)。 http://kahunaball.com/android/screenshot_0.jpg