如何創建一個像Google+的導航抽屜,其中有用戶個人資料信息標題和listview
以下?像Google+一樣的導航抽屜
我在我的活動下面的代碼:
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.br.app.MainActivity">
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<fragment android:id="@+id/navigation_drawer"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
android:name="com.br.app.NavigationDrawerFragment" />
</android.support.v4.widget.DrawerLayout>
目前,NavigationDrawerFragment只包含一個ListView,但我嘗試添加的RelativeLayout作爲容器內的RelativeLayout創建配置文件區域和下面的列表視圖,但應用程序崩潰。
我已閱讀教程from,但據我所知,我的標題將是listview
的一個項目,它不會固定在頂部(不滾動)。
如何創建像Google+這樣的自定義導航抽屜?
謝謝你,非常有幫助的評論! –