11

In iPhone, there is the concept of Action Sheet. I want to use the same functionality on a button click in Android, but Android doesn't have Action Sheet. Can anyone tell me the equivalent of Action Sheet in Android?

Arnaud
  • 7,259
  • 10
  • 50
  • 71
ADARSH YADAV
  • 157
  • 2
  • 3
  • 9

1 Answers1

9

You may use Popup Menu in Android

A popup menu displays a list of items in a vertical list that's anchored to the view that invoked the menu. It's good for providing an overflow of actions that relate to specific content or to provide options for a second part of a command. Actions in a popup menu should not directly affect the corresponding content—that's what contextual actions are for. Rather, the popup menu is for extended actions that relate to regions of content in your activity.

Aziz Shaikh
  • 16,245
  • 11
  • 62
  • 79
  • Hay Aziz,but context menu uses instance of menu inflator,so it will work only when i clicked menu button, however my actual requirement is that i have a button on an image,and when i clicked on that button then Action sheet with four buttons appear in foreground.for more clear concept please have a look of an Action sheet image on google. – ADARSH YADAV Apr 17 '12 at 11:23
  • Do you think Popup menus serve you better in this case? – Aziz Shaikh Apr 17 '12 at 11:25
  • no,my client requirement is that when i click on button then a four buttons comes in foreground from bottom of the screen(Same as action sheet in iPhone,it is very easy in iPhone) and that button goes to background,out of these four buttons one is cancel button,when we click on cancel button then all four buttons again went to the bottom of the screen and background button comes in foreground again.and this thing is only achieved by Action sheet in iPhone, that's why i m looking for a same thing in android.if you have any idea then please help me out? – ADARSH YADAV Apr 17 '12 at 11:32
  • on that sheet i have four buttons like,MMS,EMAIL,FACEBOOK and cancel. – ADARSH YADAV Apr 17 '12 at 11:33
  • Now its more clear, sorry no idea about this. Seems like you would have go out of the way to implement it. – Aziz Shaikh Apr 17 '12 at 11:40
  • Aziz please have a look on this image,i have to create same thing in android on a button click.http://www.mobile.safilsunny.com/wp-content/uploads/2012/01/UIActionSheet-2.png – ADARSH YADAV Apr 17 '12 at 11:42
  • ok,buddy thanx for help,it was nice tacking to you. – ADARSH YADAV Apr 17 '12 at 11:43