Skip to content

MichelBahl/com.optiondialog.widget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

com.optiondialog.widget

Alloy Slidein option dialog

Overview

The widget shows an slide in option at the bottom of the screen for iOS and Android.

Features

  • Darkened background
  • Slide in can be delayed by settings
  • Styleable via TSS

How to

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",
}

Video demo

Android:

IMAGE ALT TEXT HERE

iOS:

IMAGE ALT TEXT HERE

Testing

There is a test app in example branch.

About

Slidein option dialog

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages