Xamarin Tabhost-重叠选项卡内容
我使用TabHost小部件从Xamarin创建了一个选项卡式应用程序 当我更改选项卡时,它们是重叠的。 这是主页的布局。 我在屏幕的按钮上有标签,上面有标签的内容。 选项卡是动态创建的Xamarin Tabhost-重叠选项卡内容,xamarin,android-tabhost,fragment-tab-host,Xamarin,Android Tabhost,Fragment Tab Host,我使用TabHost小部件从Xamarin创建了一个选项卡式应用程序 当我更改选项卡时,它们是重叠的。 这是主页的布局。 我在屏幕的按钮上有标签,上面有标签的内容。 选项卡是动态创建的 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.and
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<FrameLayout
android:id="@+id/actualtabcontent"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_above="@+id/tabContainer"/>
<LinearLayout android:id="@+id/tabContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<TabHost android:id="@android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/fullOpacityBlack">
<LinearLayout android:orientation="vertical"
android:layout_width="match_parent" android:layout_height="match_parent">
<TabWidget android:id="@android:id/tabs"
android:orientation="horizontal"
android:layout_width="match_parent" android:layout_height="90dp"
android:layout_weight="0"
android:layout_alignParentBottom="true"
android:background="@color/fullOpacityBlack" />
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</LinearLayout>
</TabHost>
</LinearLayout>
</RelativeLayout>
我通过在每个选项卡布局上添加背景来解决问题我通过在每个选项卡布局上添加背景来解决问题