繁体   English   中英

如何制作自定义的导航抽屉菜单?

[英]How do I make a customized Navigation Drawer menu?

我想设计一个像下图这样的菜单,但是我无法自定义导航抽屉。

我想做: https : //ibb.co/f2NFZQL

我可以: https : //ibb.co/xFNQ2b4

我不知道如何充分利用 Stackoverflow。 我很抱歉。

 <FrameLayout
        android:id="@+id/fragment_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"></FrameLayout>

<com.google.android.material.navigation.NavigationView
    android:layout_width="wrap_content"
    android:layout_gravity="start"
    android:background="#4c4c4c"
    android:id="@+id/nav_view"
    app:headerLayout="@layout/nav_header"
    app:menu="@menu/drawer_menu"
    app:itemTextColor="#ffffff"
    app:itemIconTint="#d4f23a"
    android:layout_height="match_parent">

</com.google.android.material.navigation.NavigationView>

您可能可以使用 github 中提供的一个库。 请访问此站点:- https://github.com/mikepenz/MaterialDrawer

我希望这能帮到您。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM