提问人:Marfog509 提问时间:8/30/2023 更新时间:8/30/2023 访问量:24
如何在 android studio 中没有工具栏的情况下让我的垂直省略号菜单显示在我的 android 应用程序上?
How do I get my verticial ellipsis menu to show on my android app without a toolbar in android studio?
问:
我只想在我的应用程序的右上角有一个省略号菜单,该菜单当前位于我的工具栏上。我尝试从我的应用程序中删除我的工具栏,但是当我这样做时,我的省略号菜单也消失了。我希望省略号菜单即使在滚动时也能一直显示,并且我不希望它位于透明工具栏上,因为这可能会影响我的应用程序中的其他交互功能。我该怎么做才能做到这一点?
我的菜单在顶部的activity_main.xml文件中标记:
<androidx.constraintlayout.widget.ConstraintLayout
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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/black"
tools:context=".MainActivity"
app:menu="@menu/my_menu">
我试图删除主题 .xml 文件中的工具栏,但省略号菜单也消失了。解决这个问题的最佳和最简单的方法是什么?
答: 暂无答案
评论