【问题标题】:How to make this bottom navigation bar?如何制作这个底部导航栏?
【发布时间】:2020-02-03 20:46:19
【问题描述】:

你好!

我只是想知道是否可以使用这个令人惊叹的蓝色中心按钮制作像this 这样的底部导航栏。我只想要设计(xml代码)。你能帮帮我吗?

谢谢!

【问题讨论】:

  • 您找到解决方案了吗?请查看我的回复

标签: android android-studio


【解决方案1】:

我猜你可以从这个tutorial开始得到你想要的效果 那么你必须工作我猜这个圆圈,这样你就可以在另一个改变大小的教程之后放大尝试this只是为了热身并对这个概念充满信心,那么你将找到五个解决方案,代码为here

<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">

  <!-- Other components and views -->

  <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:navigationIcon="@drawable/ic_menu_24"/>

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-09-26
    • 1970-01-01
    • 1970-01-01
    • 2020-05-06
    • 1970-01-01
    • 1970-01-01
    • 2023-02-05
    • 1970-01-01
    相关资源
    最近更新 更多