Android 选项卡活动:选项卡内容顶部的一些空间

Android 选项卡活动:选项卡内容顶部的一些空间,android,tabactivity,Android,Tabactivity,我已经创建了自己的自定义选项卡活动。问题是每页都会在选项卡内容的顶部和底部留下一个小的空白条。我的选项卡布局尝试填充父级,但仍有一些条带可见 蓝色下带应接触上带 我的选项卡活动xml布局: 答案可能太晚了,但我也有同样的答案,所以这可能有助于其他人寻找解决同一问题的方法。。。在project中尝试可绘制的xml文件,并尝试像在project中一样替换tab xml的布局xml文件。。希望它能起作用 <LinearLayout android:layout_width="fi

我已经创建了自己的自定义选项卡活动。问题是每页都会在选项卡内容的顶部和底部留下一个小的空白条。我的选项卡布局尝试填充父级,但仍有一些条带可见

蓝色下带应接触上带

我的选项卡活动xml布局:



答案可能太晚了,但我也有同样的答案,所以这可能有助于其他人寻找解决同一问题的方法。。。在project中尝试可绘制的xml文件,并尝试像在project中一样替换tab xml的布局xml文件。。希望它能起作用

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >


    <RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/navigation_bar"
        android:paddingTop="8dp" >

        <Button
            android:id="@+id/btnRecipesChosen"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_marginLeft="@dimen/navigatorBarLeftRightButtonsMargin"
            android:background="@drawable/button_chosen" >
        </Button>

        <Button
            android:id="@+id/btnRecipesFind"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_gravity="right"
            android:layout_marginRight="@dimen/navigatorBarLeftRightButtonsMargin"
            android:background="@drawable/button_find" >
        </Button>
    </RelativeLayout>

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

        android:layout_marginBottom="-9dp"
        android:layout_weight="1" />

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