Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Button not responding to Click Event after Translation animation

Tags:

android

I have performed a Translation animation on button ,everything work as i excepted ,but only the problem is after the animation the button not responding to click event please correct me

Button b=(Button)findViewById(R.id.button1);
    TranslateAnimation slide=new TranslateAnimation(0, 30, 0,-40);
    slide.setDuration(500);
    slide.setZAdjustment(TranslateAnimation.ZORDER_TOP);
    slide.setFillAfter(true);

    b.startAnimation(slide);
like image 459
Bytecode Avatar asked May 04 '12 05:05

Bytecode


1 Answers

This will translate the object in y direction:

ObjectAnimator mover = ObjectAnimator.ofFloat(v, "translationY", 0, 400);
mover.start();
like image 109
Sushil Kadu Avatar answered Sep 22 '22 11:09

Sushil Kadu