Alloy Slidein option dialog
The widget shows an slide in option at the bottom of the screen for iOS and Android.
- Darkened background
- Slide in can be delayed by settings
- Styleable via TSS
Add the widget to your *Window:
<Alloy>
<Window>
<Button backgroundColor="#FFFFFF" title="Dialog" onClick="doDialog" top="10dp"></Button>
<Widget src="com.optiondialog.widget" id="optionDialog" onClick="doClickOptionDialog"></Widget>
</Window>
</Alloy>
//Show up the dialog
function doDialogOne(e){
$.optionDialog.show();
}
//Catch event fired by clicked option dialog
function doClickOptionDialog(e){
alert(e.index);
}
##Init the Widget in TSS file
//Standard version
"#optionDialog" : {
title:"Choose an Option",
options:[
"Option 1",
"Option 2",
"Option 3"
],
cancel: "Cancel",
}
Android:
iOS:
There is a test app in example branch.