Question

I have a button. When I click that button I want show a animated menu in the top of that parent layout that includes an edit text and a button. How can I do that?

Was it helpful?

Solution

You can use a TranslateAnimation:

http://developer.android.com/reference/android/view/animation/TranslateAnimation.html

depending on what kind of animation you have in mind. You start the animation in the OnClickListener of your button. You could simply add

android:onClick="startAnimation"

in your button xml code, and define the

public void startAnimation(View v)

in your activity.

Maybe this is also helpful: http://developerlife.com/tutorials/?p=343

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top