Android – actionbar and navigation drawer – slide actionbar with activity / fragment

I am using the navigation drawer, as shown in here: Android example. At this time, the operation bar is static, and it will not move when the drawer is opened / closed (only its title is changed). How can I apply this effect:

I want the whole actionbar to move with the sliding clip. And the name and button on the actionbar remain unchanged. Please tell me what code you need to see

In addition, question 2:

When you use drawerlayout, you include FrameLayout (for content_frame) and listview (where you add navigation settings) in the XML... In this drawer, you can modify the layout so that you can add not only listview but also other views. What else? At the top or bottom of listview? Like this:

I want to add an ImageView without hyperlinks (not hyperlinks, just images) and additional textviews (for description)

resolvent:

Consider using the slidingmenu Library in GitHub. It has powerful flexibility, and you can use it as you like. You can slide the operation bar by calling the following command:

setSlidingActionBarEnabled(true);

https://github.com/jfeinstein10/SlidingMenu

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>