Android Developers: What syntax do you always seem to forget?
Thought I’d through a question out the to all the Android Developers and ask: What syntax or parts of the development process do you always seem to forget or relearn?
I’ve got 3 that I always have to look up or when I try to debug what I’ve just done, it never seems to work the first (or second time).
1. The show() part of a Toast.
I get the,
Toast.makeText( this, “Some text”, Toast.LENGTH_SHORT )
but I just never remember the show() on the end. Then I go and run the behavior and mull over it for 5 minutes before I finally remember.
2. Entering new Activities into the manifest file, at least this one gives you an error.
3. For whatever reason, I can never remember the Android reference syntax the first time. Is it R.android.id or android.R.id…thanks to Eclipse code completion this isn’t to big of an issue.
So what always seems to stump you about the Android API or syntax?? Leave a comment or you can you this for fodder for your own blog.
(Updated 1/30/09 7:55am : corrected some grammar…syntax errors)

February 9th, 2009 at 1:45 pm
Yeah, I also like to forget show() on a Toast. It is confusing, because there is also ProgressDialog.show() which does the whole job for you.
March 20th, 2009 at 1:44 pm
… and, of course, my all-time-favorite: forgetting commit() after changing preferenced with edit().