Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: iOS UIActionSheet equivalent

I am converting an iOS app over and need to implement the equivalent of a UIActionSheet from iOS to Android.

What UI element would most closely mimic this.

I am targeting Android 2.2 and up.

like image 893
Ian Vink Avatar asked May 30 '12 00:05

Ian Vink


People also ask

What is Actionsheet in react native?

React Native Action Sheet is a cross-platform React Native component that uses the native UIActionSheet on iOS and a pure JS implementation on Android.

Which method will present the action sheet?

You can present an action sheet from a toolbar, tab bar, button bar item, or from a view.

What is the Action Sheet?

An action sheet is a modal view that presents choices related to an action people initiate.

How do I display an action sheet in Swift?

Enter Swift as Language and Storyboard as User Interface. Choose Next. Go to the Storyboard, drag a Button from the Object Library to the View Controller inside the Storyboard. Double-click the Button and give it a title of"Display Action Sheet".


1 Answers

You would use an AlertDialog or Dialog object. The AlertDialog class does what you ask. Dialog allows for more customizability.

Edit: if you want the same animative effect, you're going to need to use a SlidingDrawer.

Note: None of these classes, except maybe the AlertDialog, are as easy to use as the UIActionSheet.

like image 132
Zaid Daghestani Avatar answered Oct 02 '22 08:10

Zaid Daghestani