I want to animate a button such that it moves from android:gravity="centre" to android:gravity="top". Any suggestions as to how can I achieve this. I’m still new to android so please provide some code as well. Thanks!!
I want to animate a button such that it moves from android:gravity=centre to android:gravity=top
Share
For that, you have to use translate animation: here is the android documentation: http://developer.android.com/reference/android/view/animation/TranslateAnimation.html
And a nice tutorial: http://iserveandroid.blogspot.ch/2010/12/slide-up-down-translate.html
Try to use the tutorial, if you have more specific programing questions, please edit your answer and I will help you.