开发者

Android Tabs Margin/Padding

开发者 https://www.devze.com 2023-02-14 05:39 出处:网络
I am trying to use tabs in my app and have a problem with my icons and text in any tab after the first (see attached image).Is there something I am doing wrong in my layout?Here is my XML:

I am trying to use tabs in my app and have a problem with my icons and text in any tab after the first (see attached image). Is there something I am doing wrong in my layout? Here is my 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="wrap_content"
    android:layout_height="wrap_content">
    <LinearLayout android:orientation="vertical"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:padding="5dp">
        <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="f开发者_StackOverflowill_parent" android:layout_height="fill_parent"
            android:padding="5dp">
            <include layout="@layout/tab1"/>
            <include layout="@layout/tab2"/>
            <include layout="@layout/tab3"/>
        </FrameLayout>
    </LinearLayout>
</TabHost>

All 3 layouts have just a ListView root.

Android Tabs Margin/Padding

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号