Learning Android
January 11th, 2010
I’m excited to be programming in Java again. I bought one of those fancy touch screen Android phones in October because I wanted to start writing applications for mobile phones (OK… I wanted a new toy). I skimmed the Android framework documentation and did the Hello World tutorial back in December. But late last week I dove in head first and decided to start writing an app.
I believe that the best way to learn how to do anything is to just do it. Overcoming the challenges you encounter while building something real is where you learn all the twisty little quirks that every platform has. The online Android developer guide and reference is fantastic. And I love books (any recommendations?). But, for example, in the last few days of actually building an an Android app I’ve learned:
- There’s a difference between a paused activity and one that’s just obscured.
- Trying to load Drawable resources in onLayout() of a custom component breaks the Eclipse WYSIWYG layout tool (“NotFoundException: Could not find drawable resource…”).
- SoundPool feels much more responsive than MediaPlayer for playing short sound effects.
- DatePicker uses the same internal representation as Calendar.
- Creating a custom component that extends a standard one and draws itself is actually pretty simple.
So far, developing on the Android platform (version 1.5 right now) feels solid and is very productive. The framework takes care of a lot low-level junk for you so you can concentrate on app features. I feel like I’ve wrapped my head around the “Android way” of Activities and Intents and Listeners. Now it’s just a matter of becoming a little more comfortable with Java and learning the capabilities of the framework itself.



