Monday, January 10, 2011
Teaching Myself Android: Roadblocks
Posted by Liza Cordero
I was in the middle of Chapter 4 and digging into the API documentation when I stumbled upon the Java source code - and felt so enlightened and momentarily happy...
So I went back and reviewed the snippets of code, but I still wasn't quite sure where to put them within the lines of code. So I did some trial and error, which hopefully did not aversely affect my husband's phone, but my attempts did not produce the results I had hoped. I also had to reinstall Unblock Me and gave up on getting Angry Birds to work.
I felt so lost! Here I was thinking, all I needed was this Teach Yourself book and I'd be developing Android Apps in no time. Three chapters later, I'm digging through API that I have no idea where to put.
Then I had this brilliant idea - why don't I do a Google search. One of the examples had code that I assumed was for putting a background color in the layout of your application. And to my utter frustration, I could not find code for backgroundColor in the API documentation. My exact search terms were, "how to change background color of Android app" and voila! I found a blog that had the source codes for doing exactly that - with clear labels of where to put the source code (java source, resource files, layout files). Now this documentation I understand perfectly - after reading the first 3-4 chapters of my book, of course!
I can't wait to test the source codes I found, don't worry I'll tell you all about it when I get it working. I guess the moral of the story is that there is no such thing as a silver bullet. You want to teach yourself a new skill? Then you need to find all the resources you can to educate yourself - and there will be roadblocks! You just have to learn to overcome them (or go around them, whichever you prefer).