Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在底部导航中添加超过 5 个项目,但它只允许 5 个项目。所以我想添加屏幕,用户可以在其中更改底部导航中的项目,无论他想要什么。我在 IOS 应用程序中看到过这种行为,但在任何 andorid 应用程序中都没有看到。可能吗?
您现在可以添加超过 5 个选项卡,现在有一个简单的方法:使用 Support Library 28 并添加app:labelVisibilityMode="labeled"到您的BottomNavigationViewXML 声明中。或者您可以通过创建自己的 XML 布局来创建自定义的 BottomNavigationView。首先尝试下面的代码片段。
app:labelVisibilityMode="labeled"
BottomNavigationView
试试这个解决方案: 解决方案
这个例子也可以帮助你:Exaple
希望这可以帮助你