android - 底部应用栏导航图标不是垂直居中

标签 android android-layout material-design android-appbarlayout bottombar

我正在使用 android.support.design.bottomappbar.BottomAppBar 但是当添加选项菜单时导航图标出现在左上角。

没有选项它按预期工作(center_vertical)。

带有选项菜单

enter image description here

没有选项菜单

enter image description here

谁能告诉我如何解决它?

最佳答案

在您的布局中,您可以将 BottomAppBar 主题更改为:

<android.support.design.bottomappbar.BottomAppBar
    ...
    android:theme="@style/Widget.MaterialComponents.BottomAppBar"
/>

关于android - 底部应用栏导航图标不是垂直居中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50325310/

相关文章:

android - 如何使用 html5 音频标签在 Android 上使用 phonegap 播放本地 mp3?

来自 Db 的 Android Spinner - 默认值 = null?

android - 如何从在 XML 中创建的 SupportMapFragment 获取 GoogleMap 对象? API 级别 8

android - 单击时在 gridView 的填充空间中获取橙色突出显示颜色

android - 如何一起使用android :Theme. Material和Toolbar?

android - Android 4.4和5.0中不同的状态栏样式

android - 自定义标题栏定位

android - 使 SwipeRefreshLayout 动画不可见

android - 如何构建像 Pinterest 应用程序一样的登录图像幻灯片背景?

javascript - 了解 Angular Material gridList