I want add ActivityIndicator for when reading geocoodinates. how can i add ActivityIndicator for Geolocation.
1 Answer
How about something like this:
function location_callback (e) { ai.hide (); if (Ti.Platform.name === 'iPhone OS') { _self.remove (ai); } } var ai = Titanium.UI.createActivityIndicator({ message: "getting location..." }); if (Ti.Platform.name === 'iPhone OS') { _self.add(ai); } ai.show(); Ti.Geolocation.addEventListener('location', location_callback);where
_self is the current window or view.
Your Answer
Think you can help? Login to answer this question!