Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android equivalence of iOS ActionSheet

What is the Android equivalence of the UIActionSheet in the iOS SDK? I am working on a React-Native project and need to maintain the use of native controls where possible. I have not come across an npm package or other that makes use of the respective plartform 'actionsheet'. They all seem to use native actionsheet in iOS, and a javascript mock of the iOS actionsheet for Android (which makes it non-native on Android). If I can know what android shows where iOS shows an actionsheet then I can make use of the RN Android component for android and actionsheet for iOS. I hope this is a clear question.

like image 372
pnizzle Avatar asked Dec 05 '17 03:12

pnizzle


People also ask

Does Android have action sheets?

But Action Sheets are ABSOLUTELY different in Android. If you spend some time reading some UX books about Android UX, you'll learn that the ActionSheets should be displayed on the TopRight corner, or in a center modal, depending on the content to show. But it never is a list of options from the bottom.

What is the Action Sheet?

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


1 Answers

We use BottomSheetDialog to do the same work in Android. Not exactly the same and may require a bit more code to write compared to iOS. But the end result is similar.

References:

https://developer.android.com/reference/android/support/design/widget/BottomSheetDialog.html https://medium.com/glucosio-project/15fb8d140295

like image 55
Yuchen Avatar answered Sep 22 '22 12:09

Yuchen