I'm developing an android application, one page is like this:
You can see on the top of right part, there is a "settings" button. When clicking it, there will be a panel come out from the left.
I'm new to android, and I don't know what components shall I use.
It is called side navigation
or a sliding menu
. Introduced by facebook i believe.
Here is an answer how to design this:
and project code:
https://github.com/gitgrimbo/android-sliding-menu-demo
I haven't just searched for it and pasted the link here, i actually did this in my application, it is easy to implement and works great
You can use SlidingDrawer as below:
<SlidingDrawer
android:id="@+id/my_sliding_drawer"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentBottom="true"
android:layout_margin="0dp"
android:content="@+id/content"
android:handle="@+id/handle" >
<ImageButton
android:id="@+id/handle">
<!-- Your handle content comes here. -->
</ImageButton>
<LinearLayout
android:id="@+id/content">
<!-- Your drawer contents come here. -->
</LinearLayout>
</SlidingDrawer>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.