Titanium Alloy Widget to start a countdown and display a message
This is a widget for the Appcelerator Alloy MVC framework to show a user a countdown on top of the current window.
- Free to use and open source
- Drop the widget into your view XML file
- Works on Android, iOS
- Add the widget to a view
<Widget id="countdownWidget" src="AlloyCountDownWidget"/>
Add the widget to your config.json in your project
"dependencies": {
"AlloyCountDownWidget": "*"
}
Initialize it in your controller
var countSeconds = 6, //How many seconds to countdown.
endMsg = "Start!"; //What message to display after countdown is finished.
$.countdownWidget.init(countSeconds,endMsg);
Run it in your controller
$.countdownWidget.start();
See an example usage here: https://github.com/kgividen/AlloySpike