Nee*_*mar 4 android android-layout android-appbarlayout android-bottomnav bottombar
我正在使用,android.support.design.bottomappbar.BottomAppBar但是添加选项菜单时导航图标位于左上角。
不带Option的情况下,其工作正常(center_vertical)。
带有选项菜单
没有选项菜单
谁能告诉我如何解决它?
在您的布局中,您可以将BottomAppBar主题更改为此:
<android.support.design.bottomappbar.BottomAppBar
...
android:theme="@style/Widget.MaterialComponents.BottomAppBar"
/>
Run Code Online (Sandbox Code Playgroud)
在尝试了不同的方法后,通过样式设置填充有效。
<style name="NavButtonPadding" parent="@android:style/Widget.ActionButton">
<item name="android:paddingStart">10dp</item>
<item name="android:paddingEnd">10dp</item>
<item name="android:minWidth">10dp</item>
</style>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1446 次 |
| 最近记录: |