Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Timothy Boland18,237 Points
How did you figure out which methods to use for this Animation?
I read the AnimationDrawable API and its API Guide and I cant figure out how you knew to use the setImageResource and getDrawable methods to do the animation instead of using the setBackgroundResource and getBackground methods that are in the examples.
Ive completed the Android track, but Im having trouble figuring out how to get started using a Class by reading the documentation...Sometimes the examples given dont work the way I anticipate and im curious what technique do you use to figure out how to make it work, if the documentation doesnt give a clear direction to go in.
Sorry, if this is too many questions for one post...but Im at the point where i want to start creating my own projects, but I find it hard to know where to start through the documentation alone.
Ben JakubenTreehouse Teacher
These are great questions! It's something we need to figure out how to teach in the context of our courses. I'm glad to see you trying things from the documentation.
I don't remember how I figured those out, sadly. Probably my usual methods, though. When trying something new, I'll check the documentation and then google around for answers. StackOverflow is of course immensely helpful. The official documentation is pretty good, but certainly not perfect.
It's also sometimes very helpful to look at source code of apps that do the same thing. For example, the Google I/O app each year is open-sources and often shows how to use the latest APIs. I'll also look for projects or libraries and GitHub that do what I'm trying to do and take a look at their implementations.
Lastly, always ask here in the Forum if you have a specific thing you're trying out! :)