Button is not clickable after TranslateAnimation

后端 未结 4 642
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-03 21:01

I\'m trying to move button (with animation) upon click. I want it to move 100 pixels to the bottom on first click, 100 pixels up on second, 100 pixels to the bottom on third

4条回答
  •  独厮守ぢ
    2020-12-03 21:43

    There is an easier way worth mentioning. One can use the View.animate() method which also moves the clickable elements:

    v.animate().translationY(100).start(); // move away
    v.animate().translationY(0).start(); // move back
    

提交回复
热议问题