An Action Sheet is a list dialog implementation of bottom sheet displaying contextual actions or options, used to streamline user interactions in mobile apps.
These are the available methods for the ActionSheet component.
Example - Complete example of actionsheet
class Main extends App
{
onStart()
{
this.main = ui.addLayout("main", "Linear", "VCenter,FillXY")
this.btn = ui.addButton(this.main, "Show actionsheet", "Primary")
this.btn.setOnTouch( this.btn_onTouch )
}
btn_onTouch()
{
var choices = [
["person", "Account"],
["share", "Send to email"],
["delete", "Remove"],
];
this.act = ui.showActionSheet("", choices, "Icon", this.onSelect);
this.act.description = "This is the text";
this.act.setColor("Remove", "orange");
}
onSelect( name, icon ) {
ui.showPopup( icon );
}
}
class Main extends App
onStart()
this.main = ui.addLayout("main", "Linear", "VCenter,FillXY")
this.btn = ui.addButton(this.main, "Show actionsheet", "Primary")
this.btn.setOnTouch( this.btn_onTouch )
btn_onTouch()
choices = [
["person", "Account"],
["share", "Send to email"],
["delete", "Remove"],
]
this.act = ui.showActionSheet("", choices, "Icon", this.onSelect)
this.act.description = "This is the text"
this.act.setColor("Remove", "orange")
onSelect( name, icon )
ui.showPopup( icon )