How to add Panel in android?

Harshad picture Harshad · Mar 10, 2011 · Viewed 26.4k times · Source

I want to add a panel in android activity.I'll try explain its behaviour.

It should show small arrow on right side of my activity, If i click on that a panel having few buttons should slide out consuming around 20%-30% of current activity.

Somewhat same like menu appears on screen.

Thanks in advance.

Answer

Vincent Mimoun-Prat picture Vincent Mimoun-Prat · Mar 10, 2011

See the SlidingDrawer widget. However, this widget will only slide up and down on older SDK versions.

Else, you should consider using fragments (using the compatibility API if necessary). You can look for some explanations about how the GMail app is built, or the HoneyComb gallery example to get information about animating fragments.