ナビゲーションメニューを完全に変更したいと言ったので、リストビューやナビゲーションビューを直接引き出しレイアウトにしないでください。
Drawerレイアウトとフラグメントレイアウトxmlのナビゲーションメニューをフラグメントとして作成すると、リストビューを作成できます。次に、あるフラグメント(メニューとサブメニューリストを含む)を別のフラグメントに簡単に置き換えることができます。
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/main_layout"
android:background="#ffffff">
//main content view
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- The drawer is given a fixed width in dp and extends the full height of
the container. -->
<fragment android:id="@+id/navigation_drawer"
android:layout_width="200dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:name="Your's Base menu list fragment"
tools:layout="@layout/drawer_drawer" />
</android.support.v4.widget.DrawerLayout>
希望すると、これが役に立ちます。
ドロワーのサブメニューを作成するために、消費可能リストビューを使用します。 –
@VishalChauhan私は知っているが、それは私が探しているものではありません。ナビゲーションメニューを変更するには、新しいメニューで変更します。 –