Action Sheet
The ActionSheet plugin shows a native list of options the user can choose from.
Requires Cordova plugin: cordova-plugin-actionsheet. For more info, please see the
ActionSheet plugin docs.
Cordovaの問題で困っていますか?
本格的なプロジェクトを構築している場合、トラブルシューティングに時間を費やす余裕はありません。Ionicのエキスパートが、保守、サポート、統合に関する公式サポートを提供しています。
インストール
Ionic Native Enterprise はIonic Teamが完全にサポートしメンテナンスしているプラグインを利用できます。 詳しくみる か、エンタープライズプラグインに興味があれば 連絡ください
サポートしているプラットフォーム
- Android
- Browser
- iOS
- Windows
- Windows Phone 8
利用方法
React
Angular
import { ActionSheet, ActionSheetOptions } from '@ionic-native/action-sheet/ngx';
constructor(private actionSheet: ActionSheet) { }
...
let buttonLabels = ['Share via Facebook', 'Share via Twitter'];
const options: ActionSheetOptions = {
title: 'What do you want with this image?',
subtitle: 'Choose an action',
buttonLabels: buttonLabels,
addCancelButtonWithLabel: 'Cancel',
addDestructiveButtonWithLabel: 'Delete',
androidTheme: this.actionSheet.ANDROID_THEMES.THEME_HOLO_DARK,
destructiveButtonLast: true
}
this.actionSheet.show(options).then((buttonIndex: number) => {
console.log('Button pressed: ' + buttonIndex);
});

