百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

react-native-action-sheet

> 编程语言
开源

使用原生 Android 的 React native 简单动作选单 (使用内置的 AlertDialog)

185 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

使用原生 Android 的 React native 简单动作选单 (使用内置的 AlertDialog)

react-native-action-sheet

React native action sheet with native android (using the built-in AlertDialog)

This module simply return the ActionSheetIOS if the device on iOS

iOS Android

Table of contents

  • Install
  • Usage
  • Methods

IMPORTANT ! Package name on npm is now react-native-action-sheet

Install

npm install react-native-action-sheet@latest --save react-native link react-native-action-sheet

if react native /MainApplication.java

...

import com.actionsheet.ActionSheetPackage; // getPackages() { return Arrays.asList( new MainReactPackage(), new ActionSheetPackage() // { console.log('button clicked :', buttonIndex); });


## Methods

For the iOS implementation see [ActionSheetIOS](https://facebook.github.io/react-native/docs/actionsheetios.html)

#### showActionSheetWithOptions (Android)
```javascript
/**
 * Display the native action sheet
 */

static showActionSheetWithOptions(options, callback);

@note: on Android in case of a touch outside the ActionSheet or the hardware back button is pressed the buttonIndex value is cancelButtonIndex or 'undefined'

options

option iOS Android Info
options OK OK (array of strings) - a list of button titles (required on iOS)
cancelButtonIndex OK Ok (int) - index of cancel button in options
destructiveButtonIndex OK - (int) - index of destructive button in options (same as above)
title OK OK (string) - a title to show above the action sheet
message OK - (string) - a message to show below the title
tintColor OK - (string) - a color to set to the text (defined by processColor)

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Java

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言