« | Main | »

March 10, 2010

Eclipse's Android Development Kit is cool, but some things are a pain in the ass -- e.g. adding a string resource. So, add_string is an ever so trivial, but pretty useful script for creating string resources in Android projects. You pass it the name of the resource and the value of the resource as the rest of the arguments. For example, to add the string "Weinberg is a bag of douche" with the name weinberg, I'd do the following:
> add_string weinberg Weinberg is a bag of douche
Then res/values/strings.xml will be updated with the correct new value. If I try it again, I'd get a message saying this string name already exists and nothing would be written. If I tried again with a different name but same string I'd get a message saying the same string exists, but wouldn't exit.

Posted by jeff at March 10, 2010 02:48 PM