I needed the right event to react on many repetitive taps. I noticed that click
stops firing after some taps, so I did a little test to find the right event to listen to instead.
As the console.log
shows, you need singletap
;)
// Alloy doesn't listen to changes, so we do: | |
$model.on('change', function (model) { | |
$.name.text = model.get('name'); | |
}); |
Just so me and you both know from now on... for some reason:
streamer.addEventListener('change', function (e) {
// This doesn't work
if (e.state === Ti.Media.AudioPlayer.STATE_PAUSED) doSomeThing();
// This does:
if (e.state === this.STATE_PAUSED) doSomeThing();
Supporting text shadow for Labels on Android has been a request ever since Titanium 1.7.x. It's now scheduled for 3.2.x, but it probably has been for every version since :)
This small workaround works for 80% of what I need: just a tiny small shadow 1 pixel up or down.
However, you must know that:
This gist shows you how to do a slide-down menu in Titanium.
Features:
Images:
I guess just like me you like to do alert('My message');
instead of:
Ti.UI.createAlertDialog({
message: 'My message'
}).show();
But I'd even more like to do alert('My message', 'My title', myCallback);
instead of:
If you have a CommonJS module that exposes properties that are expensive to create (e.g. other CommonJS modules or some external resource), you can load them lazy using Object.defineProperty()
.