Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ionic actionsheet cancelButton not shown on android

Tags:

android

ionic

I looked at http://codepen.io/mhartington/pen/KwBpRq?editors=101 , and I have not seen cancelButton on android. On iOS everything works fine. How can I display cancelButton?

$ionicActionSheet.show({
  titleText: 'ActionSheet Example',
  buttons: [
    { text: '<i class="icon ion-share balanced"></i> Share' },
    { text: '<i class="icon ion-arrow-move assertive"></i> Move' },
  ],
  destructiveText: 'Delete', // <<
  cancelText: 'Cancel',
  cancel: function() {
    console.log('CANCELLED');
  },
like image 838
DenniLa2 Avatar asked Aug 16 '15 12:08

DenniLa2


1 Answers

_action-sheet.scss has rule:

.platform-android .action-sheet-cancel {
    display: none;
}

To display cancelButton insert in .css/.scss file:

.platform-android .action-sheet-cancel {
    display: block !important;
}
like image 154
DenniLa2 Avatar answered Nov 15 '22 03:11

DenniLa2