With web services used everywhere, being able to parse XML is a necessary skill when developing Android apps. Here’s an example for you to modify for your own purposes.
(more…)
Parsing XML in Android
Localisation with Google Android (that’s localization for US readers…)
Google Android provides the tools to easily localise your apps, in the form of string resources defined in xml files. Let’s look at how to use them.
(more…)
onClick tip for Android views
If the code below for handling your Android clicks looks familiar
findViewById(R.id.myButton).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
/**do stuff**/
}
});
it’s time to introduce you to android:onClick attribute.
(more…)
The power of XML?
My next Google Android app will be a RSS Reader and naturally, I have to brush up on my XML knowledge so I have picked up the excellent Java and XML (aff.) book and I have to say, this convinces me that XML is the way to go for what will be my first desktop app.
OK, I have to admit here, I am planning a desktop Java app and I thought a few weeks ago that I would use xml for the data. This is partially why I was keen to experiment with programming a RSS Reader for Google Android, as my first foray into xml parsing. The other reason for the RSS Reader is that I have come to rely on mine (I use Google Reader) and I prefer using it on my work computer, which has a bigger screen. This got me wondering: how to create a user-friendly RSS Reader interface for a small screen? This was all the challenge I needed to get me started
So far, I have only read up on SAX and I have started playing around with it – it does what I imagined it should do, so I’m pretty pleased about it. I’m thoroughly enjoying working with XML but as I’m only starting out, I’m sure some more advanced programmers will be quick to damper my enthusiasm.
So, for you, does XML live up to its potential? Or is it just another data format you have to contend with?