我想从操作栏中删除下面的签名行,我该怎么做?
这是我的操作栏:
<< img src =“ https://image.soinside.com/eyJ1cmwiOiAiaHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS9USGxLYS5wbmcifQ==” alt =“在此处输入图像描述”>
这是我的menu.xml文件:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
>
<item
android:id="@+id/foo2"
android:icon="@drawable/foo2"
android:showAsAction="ifRoom|withText"
android:title="@string/foo2"/>
<item
android:id="@+id/foo"
android:orderInCategory="100"
android:showAsAction="always"
android:title="@string/foo"/>
<item
android:id="@+id/foo1"
android:icon="@drawable/foo1"
android:showAsAction="ifRoom|withText"
android:title="@string/foo1"/>
</menu>
预先感谢
styles.xml
对于您的工具栏,然后将“ divider”属性添加为null。
<style name="MyCoolToolbarStyle" parent="Widget.AppCompat.Light.ActionBar.TabBar">
<item name="divider">@null</item>
</style>
并将这种样式应用于您的工具栏,例如:
<androidx.appcompat.widget.Toolbar android:id="@+id/my_toolbar" style="@style/MyCoolToolbarStyle"/>