Android动画效果,控件View.getY(),View.getX()获取初始值为0
太奇葩了,以为是动态添加view造成的布局上的问题,换成xml布局还是一样。objAnimatorX = ObjectAnimator.ofFloat(textViews.get(i), "X", textViews.get(i).getX()+distanceX);最后改成了按原始位置的偏移量进行移动objAnimatorX = ObjectAnimator.ofFloat(textViews.get(i), "translationX", distanceX);...
原创
2020-12-23 18:21:21 ·
533 阅读 ·
0 评论