BottomAppBar菜单项位置错误

时间:2018-11-04 23:17:46

标签: android android-layout floating-action-button bottomnavigationview android-bottomappbar

菜单项显示在FAB的后面,如何在对面显示菜单项?

<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.bottomappbar.BottomAppBar
  android:id="@+id/bar"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:layout_gravity="bottom"
  app:fabAlignmentMode="end"
  app:navigationIcon="@drawable/list"/>

 <com.google.android.material.floatingactionbutton.FloatingActionButton
  android:id="@+id/fab"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:src="@drawable/messages"
  app:layout_anchor="@id/bar"/>

</android.support.design.widget.CoordinatorLayout>

enter image description here

1 个答案:

答案 0 :(得分:0)

将android studio更新到最新版本解决了该问题