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?
1 Answer
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.
-
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. Apr 17, 2012 at 11:23
-
-
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? Apr 17, 2012 at 11:32
-
on that sheet i have four buttons like,MMS,EMAIL,FACEBOOK and cancel. Apr 17, 2012 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. Apr 17, 2012 at 11:40
Context Menu
is the solution in Android.