2

I am developing an app on Android and would like to use the similar menu bar like Google Plus or Facebook, when you click the button, the menu bar will slide in and will not occupy the whole screen. Any ideas on that?

Thanks.

GeFrode
  • 23
  • 1
  • 4
  • 1
    I would suggest carrying out a good search engine query. After a few clicks I got [this](http://stackoverflow.com/questions/11234375/how-did-google-manage-to-do-this-slide-actionbar-in-android-application) – A--C Dec 19 '12 at 03:28
  • I tried google for a few days, can't get desire results, some suggestion said use Fragment, but it seems like only work on tablet. – GeFrode Dec 19 '12 at 03:55

2 Answers2

0

You can use FrameLayout in parent view and use translate animation in menu layout to show the slide in and slide out effect.

0

A pretty popular library for accomplishing the 'sliding menu' effect (or 'drawer' as the design guidelines on the Android developer website prefer to call it) is Jeremy Feinstein's SlidingMenu. It's also compatible with ActionBarSherlock, in case your project is using that too. Unfortunately, at this stage there is no component built into the SDK that allows you to do easily accomplish the same thing.

There are also a couple of alternative implementations for a sliding menu (do a search either here on SO or Google), but I haven't checked those out for a little while. If I recall correctly, there are especially some variations in terms of whether the ActionBar is supposed to slide along with the content or stay fixed at the top of the screen.

MH.
  • 45,303
  • 10
  • 103
  • 116