Loading..

Goodbye!

Last week’s Reacting to React Native was the last of 84 posts I wrote for tiDev since I started it with some of my fellow Titans and friends in December 2013. Its mission: TiDev is a new independent blog bringing news, rumors, tips & tricks, reviews and more on Appcelerator’s Titanium platform and Alloy framework […]

A new year, a new tiDev!

Just a little over a year ago I welcomed you all to tiDev with the following vision: TiDev is a new independent blog bringing news, rumors, tips & tricks, reviews and more on Appcelerator’s Titanium platform and Alloy framework for building cross platform native apps. Evaluating our first year Instead of celebrating our first anniversary, […]

Positioning a Toast notification on the top half of the screen

Android Toasts are great for providing simple feedback to the user, without blocking his interaction with the current view/window. In Titanium you can use Ti.UI.Notification to create a Toast: Ti.UI.createNotification({ message: "Please Stand By", duration: Ti.UI.NOTIFICATION_DURATION_LONG }).show(); Positioning the notification The Android API guides explain how to use setGravity(gravity, xOffset, yOffset) with setMargin(horizontalMargin, verticalMargin) to […]

Hidden event methods on Android

Question 1 Which of the following 4 methods remove an event listener on Android? var id = view.addEventListener('click', onClick); view.removeEventListener('click', onClick); view.removeEventListener('click', id); view.removeListener('click', onClick); view.removeAllListeners('click'); The correct answer: all of them! Question 2 Which of the following 4 methods then add an event listener on Android? view.addEventListener('click', onClick); view.addListener('click', onClick); view.on('click', onClick); view.once('click', onClick); […]

Where does that log come from?

Of course we all use Studio’s debugger or Ti-Inspector to step through code when we run into errors, but I’m sure your code has its fair share of Ti.API.debug() or console.debug() calls as well. If your console is filled with these logs, wouldn’t it be nice to know from which file they come? Double-underscore === […]