2 回答

TA貢獻1906條經驗 獲得超3個贊

TA貢獻1820條經驗 獲得超10個贊
更多定制
如果您想為您的抽屜進行更多定制。您可以為 Drawer 創建一個布局并將其包含在android.support.design.widget.NavigationView
Like this 中
</android.support.v4.widget.DrawerLayout>
...........
<!- Drawer >
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="150dp"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:layout_gravity="left"
>
<!--- Your custom layout >
<include layout="@layout/custom_drawer_layout"
android:id="@+id/filterDrawer"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_gravity="end"
/>
</android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>
然后你可以創建一個布局 custom_drawer_layout
custom_drawer_layout.xml
<RelativeLayout>
<spinner/>
<button/>
<whatever/>
</RelativeLayout>
希望你能明白。
你可以在這里看到一個相關的項目
添加回答
舉報