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! While you're at it, check out some resources Treehouse students have shared here.
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 trialJunaid Shaikh
Courses Plus Student 1,533 PointsNot teaching how to animate..?
Ben is not showing how he created animation from his friend Jake , then how can i learn to make my own apps in the future if i dint know how to animate ,.... i want to become and android developer after learning from this tutorials please answer .....!
2 Answers
cbcbcb
16,560 PointsWell actually he did teach you how to use the AlphaAnimation class in the Android library.
For example, say you were to want to go out and create an application where you had objects the user would click and inside of one or all of those object's onClick( ) you could implement an animation and then pausing for a moment and remembering that YOU the developer are the designer of your application because YOU decide how you want to implement the features that make your application unique.
You then might decide you don't even want to use the Animation class and decide that instead do something similar like on top of the logic you are already going perform in your application when the View object gets clicked you could immediately upon entering the method body change the background color property of the view object then the line before your closing bracket change the color back.
But what if the user clicks on that View object whose purpose is to perform a transition to a new activity but you don't want to transition when a user does that and want to reserve transitions for only explicit little short clicks? If the user clicks and holds down you may still want to show the same color change you would sset your onLongClickListener( ) then override onLongClick( ) and do the exact same thing minus the logic.
Then if you decide you want to have some what of a "real" animation you could implement variations of your this color change with a range of lightest to desired color and make your starting range be the default background color then programmatically change the background color every so many milliseconds until you hit your desired color then traverse back down your array of color values until you hit your original color again. and instead of just exiting the body like last time your application will have to wait until that "animation" is done before proceeding. How graphically pleasing this animation would look would depend on how many different tones of that color you call the method to change the background color for.
Although I didn't teach you how to make things twinkle I hope that perhaps gave you a very basic idea to ponder with to come up with more creative ways. By the way I've never done that and just made that all up so maby it doesn't work. I don't know what kind of performance overhead that would cause. I can't imagine too much but then again that would depend on how rich you want that color fading in and out to look like when the object gets clicked.
Gunjeet Hattar
14,483 PointsAnimation was created as a series of images, that were then flipped at a given speed to give an illusion of an animating entity. There are many software available, free and paid that help you create the series of images. You can use Corel Draw, Illustrator, InkScape and other vector programs for the same purpose.
Ben, did however show the contents of the animation xml file and how to use that in android application. As far as I understand, the purpose of CrystalBall project is to highlight the basics of android application. Things like creating animation, I'm sure will be covered in future [for Team Treehouse to tell you more on this]
Junaid Shaikh
Courses Plus Student 1,533 PointsJunaid Shaikh
Courses Plus Student 1,533 Points@Christopher Basinger so you have made any apps after learning from the course on android development from this website ........??