Show status through notification box (ie. Loading data…)

So now i’m more into fancy stuff! :) you know what? being on web we know about how nicely gmail pops up their “Loading mail” or “Sending..” status over the browser view port. so now i’m just trying to be on mobile, i was looking for the similar kinda stuff, then built it (since it is damn simple i believe if you are lame enough you gonna read my post out) -

To make my words more understandable check out the screen shot -

See the black backed notification box

See the black backed notification box

This is the code i’ve written to appear this black semi transparent box with message -


showMessage: function(base, message, interval) {
var label = Ti.UI.createLabel({
text: message,
backgroundColor: '#000',
color: '#fff',
height: 40,
borderRadius: 10,
opacity: 0.7,
shadowColor: '#ccc',
textAlign: 'center',
top: 100,
width: '90%',
left: 10
});

base.getWindow().add(label);
interval = interval ? interval : 5000;

setTimeout(function() {
base.getWindow().remove(label);
}, interval);
}

This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>