Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({
title:'Query7 RSS Feed',
backgroundColor:'#000'
});
var data = [];
// create table view
var tableview = Titanium.UI.createTableView({
data:data,
headerTitle: 'Query7 RSS',
backgroundColor:'#000'
});
win.add(tableview);
var xhr = Titanium.Network.createHTTPClient();
xhr.onload = function()
{
try
{
var doc = this.responseXML.documentElement;
var items = doc.getElementsByTagName('item');
var doctitle = doc.evaluate("//channel/title/text()").item(0).nodeValue;
var urls = new Array();
for(var c=0; c>>>>' + e.index);
var intent = Titanium.Android.createIntent({
action: Titanium.Android.ACTION_VIEW,
data: urls[e.index],
});
intent.addCategory(Titanium.Android.CATEGORY_BROWSABLE);
Ti.Android.currentActivity.startActivity(intent);
});
tableview.appendRow(row);
}
}
catch(E)
{
alert(E);
}
};
xhr.open('GET', 'http://feeds.feedburner.com/query7blog.rss');
xhr.send();
win.open();
http://query7.com/titanium-mobile-android-development-first-application
No comments:
Post a Comment