xamarin - Xamarin Tabhost - 重叠的选项卡内容
问题描述
我使用来自 Xamarin 的 TabHost 小部件创建了一个选项卡式应用程序。
当我更改选项卡时,它们是重叠的。 https://imgur.com/a/cfRWlsl
这是主页面的布局。我在屏幕底部有标签,上面有标签的内容。选项卡是动态创建的。
<?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>
解决方案
推荐阅读
- python - 满量唯一均匀分布随机选择生成器
- python - 从python设置rtsp流的输出端口
- selenium - python - 在 selenium 中隐藏 IE 浏览器
- sql - SQL Server:将多行合并为 1 行
- python-3.x - 如何使用 Pika 和 Python 检查 RabbitMQ 中是否没有消息
- assembly - 汇编器和编译器之间的区别
- powershell - 使用 powershell 查找位于每个用户的 %AppData% 目录中的特定文件类型
- .net - Windows 不支持 NAT 设置中的主机 IP 地址
- aws-lambda - 使用相同代码更新 Terraform lambda source_code_hash
- sql-server - 对 Spark 框架上的 SQL Server 的 JavaKerberos 身份验证