0
嗨我正在使用滑動菜單的Android應用程序。我正在嘗試在幻燈片菜單中創建一個類似遙控器的視圖。就像一個在剝離遙控器。如何在導航抽屜中創建如此複雜的視圖?在Android Navigaton抽屜中創建複雜視圖
嗨我正在使用滑動菜單的Android應用程序。我正在嘗試在幻燈片菜單中創建一個類似遙控器的視圖。就像一個在剝離遙控器。如何在導航抽屜中創建如此複雜的視圖?在Android Navigaton抽屜中創建複雜視圖
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent">
//your stuff goes here
</FrameLayout>
<FrameLayout
android:id="@+id/navigation_drawer"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start" />
</android.support.v4.widget.DrawerLayout>
ID爲的FrameLayout navigation_drawer將是你的抽屜裏,你可以加載這裏面任何複雜的視圖中使用Fragment