Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ribbon Menu Android

I read somewhere that Google called this "Ribbon menu".

Anyway this is what I mean (also take a look at this blog):

Ribbon menu

This is Google+ app. When you click the G+ icon on the ActionBar, the entire screen moves right and a menu comes out. Note that the ActionBar also moves.

I want to do this in my application, but I don't know how. I have basic understanding of the animation framework.

The questions are:

  • What kind of layout I have to use?
  • How to animate the entire screen (with the ActionBar)?

I hope these are not too generic questions. I'm asking for examples. Thank you in advance.

like image 356
mneri Avatar asked Jul 11 '12 10:07

mneri


1 Answers

Ok, I got it. It's simple.

getWindow().getDecorView();

This line gives you the main View of your activity. The main view contains all the things that are displayed in the activity. Then you can animate it. The answer was simple.

This link helped me a lot: http://android.cyrilmottier.com/?p=658

EDIT:

This is not the way to proceed. Like Cyril Mottier said it's a hack and I found a lot of problems. I redid everything and now I'm implementing my own ActionBar.

like image 65
mneri Avatar answered Oct 21 '22 12:10

mneri