1

I have created my own custom TabActivity. The problem is that each page leaves a small blank strip at the top and the bottom of the tab content. My tab layouts try to fill the parent but still some strips are visible.

screen

the blue lower strip should touch upper strip.

my tab activity xml layout:

<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>

Community
  • 1
  • 1
Jakub Pilimon
  • 131
  • 1
  • 10

1 Answers1

0

It might be too late for the answer but i had kind of the same issue so this might help for others searching out solution for the same issue ... Try out the drawable xml files in this project and try to replace the layout xml file of tab xml like it's done in this project here .. Hope it works !!

Community
  • 1
  • 1
iOSBee
  • 217
  • 7
  • 22