开发者

Android + Bringing Tab to Front

I am using the following XML for tabs and this displays the tab at the bottom. However the tabs are being overlapped by the list and i cannot access any tab feature. The picture might be able to explain it better.

Android + Bringing Tab to Front

The list is draw over the tab. I appreciate any suggestions of bringing the tab to the front XML:

![<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">
        <RelativeLayout android:orientation="vertical"
            android:layout_width="fill_parent" android:layout_height="fill_parent"
            >
            <View android:layout_width="fill_parent" android:layout_height="0.5dip"
                android:background="#000"/>
            <TabWidget android:id="@android:id/tabs"
                android:layout_width="fill_parent" android:layout_height="wrap_content"
                android:layout_marginLeft="0dip" android:layout_marginRight="0dip" 
                 android:layout_alignParentBottom="true"
                />
            <View android:layout_width="fill_parent" android:layout_height="2dip"
                android:background="#696969" />
            <View android:layout_width="fill_parent" android:layout_height="2dip"
                android:background="#000" />
            <FrameLayout android:id="@android:id/tabcontent"
                android:layo开发者_运维百科ut_width="fill_parent" android:layout_height="fill_parent" />
        </RelativeLayout>
    </TabHost>][1]


The solution for this is you have to set listview height so it will not overlap the tab at boot, just set fixed size for it.

<Listview
android:layoutheight="some fixed value">

If you are dynamically filling that then use

ln.setLayoutParams(new LayoutParams(width,height));
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜