我想制作一个包含 7 个内容页面的标签页(以 xamarin 形式,不在 native 项目中)。但是红色的菜单栏(我不知道这个东西叫什么所以我就叫它菜单栏)不是滚动菜单,所以每个内容页面的标题都没有很好地显示。像这样:
我真正拥有的东西
有人知道做这样的东西吗?
我想要的东西
最佳答案
没有看到一些代码就不能说太多! - 但我的假设是你的问题出在你的主题上......
打开“Tabbar.axml”并更改这行代码:
app:tabMode="fixed"
收件人:
app:tabMode="scrollable"
更新:
然后只需添加新行 app:tabMode="scrollable"
因为默认情况下是“固定的”
无论如何,这里是我的 Tabbar.axml :
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.TabLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/sliding_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimaryDark"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:tabIndicatorColor="@android:color/white"
app:tabGravity="fill"
app:tabMode="scrollable" />
关于c# - 如何使用 Xamarin 表单中的滚动菜单制作多个内容页面的选项卡式页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45478735/