The new Facebook application and its navigation is so cool. I was just trying to see how it can be emulated in my application.
Anyone has a clue how it can be achieved?
On clicking the the top left button the page slide and the following screen is shown:
With android support package revision 13( may 2013), there is DrawerLayout for creating a Navigation Drawer that can be pulled in from the edge of a window. And, navigation drawer is a design pattern now.
v4 support library
navigation drawer design pattern
In June 2012, Google has added "templates" in the Eclipse ADT plugin, and there is a template called "master/detail flow" which does exactly that (based on fragmets)
I've implemented facebook-like slideout navigation in this library project.
You can easy built it into your application, your UI and navigation. You will need to implement only one Activity and one Fragment, let library know about it - and library will provide all wanted animations and navigation.
Inside the repo you can find demo-project, with how to use the lib to implement facebook-like navigation. Here is short video with record of demo project.
Also this lib should be compatible this ActionBar pattern, because is based on Activities transactions and TranslateAnimations (not Fragments transactions and custom Views).
Right now, the most problem is to make it work well for application, which support both portrait and landscape mode. If you have any feedback, please provide it via github.
All the best,
Alex
After a search for several hours, I found Paul Grime's solution probably is the best one. But it has too much functionality in it. So it may be hard to study for beginners. So I would like to provide my implementation which is came from Paul's idea but it is simpler and should be easy to read.
implementation of side menu bar by using java code without XML
I think that library does not mentioned:
jfeinstein10 / SlidingMenu
github url:
https://github.com/jfeinstein10/SlidingMenu
I've implemented this with AbsoluteLayout and a simple slide controller that moves the view to a negative offset to hide.
If anyone is interested, I can clean up the code/layout and post. I know AbsoluteLayout is deprecated, but it was a very straight forward implementation. Left View/ Right View, and when "sliding open", just move the left view out from a -X offset to the device's width - whatever you want to show of the Right View