【发布时间】:2021-12-01 23:30:18
【问题描述】:
我想在浮动按钮上方添加一个信息框,如下图所示。我怎样才能做到这一点?谢谢你
<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/bottomAppBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/Theme.Fab_Bottom_app_bar"
app:hideOnScroll="true"
android:layout_gravity="bottom"
app:fabCradleMargin="15dp"
app:fabCradleRoundedCornerRadius="60dp"
app:layout_scrollFlags="scroll|enterAlways"
app:fabCradleVerticalOffset="10dp">
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottomNavigationView"
android:layout_width="match_parent"
android:theme="@style/Theme.Fab_Bottom_app_bar"
android:background="@drawable/dropbutton"
android:layout_height="match_parent"
app:menu="@menu/bottom_nav_menu" />
</com.google.android.material.bottomappbar.BottomAppBar>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/app_name"
app:backgroundTint="#2770DC"
app:tint="#fff"
android:src="@drawable/icon_add"
app:layout_anchor="@id/bottomAppBar" />
【问题讨论】:
-
网址不起作用
-
请再试一次
-
这就是你需要的github.com/skydoves/Balloon
标签: java android android-studio