0
Is there any better way to get x and y co-ordinates of a view if the view is set to animate for a few seconds in a clockwise direction.
@Override
public void onAnimationStart(Animation animation) {
// TODO Auto-generated method stub
Log.d("Anim", "Anim started");
float g = wheelMenu.getX();
float h = wheelMenu.getY();
}
@Override
public void onAnimationEnd(Animation animation) {
// TODO Auto-generated method stub
Log.d("Anim", "Anim ended");
float i = wheelMenu.getX();
float j = wheelMenu.getY();
}
@Override
public void onAnimationRepeat(Animation animation) {
// TODO Auto-generated method stub
Log.d("Anim", "Anim started");
float k = wheelMenu.getX();
float l = wheelMenu.getY();
}
Iam使用以下代碼獲取X,Y座標。要求是以循環方式旋轉視圖並監聽器來捕獲運動事件以獲取沿着動畫路徑的XY座標。在Android中獲取X和Y座標旋轉動畫
比什麼更好的方法?向我們展示一些「不太好」的代碼? – Skynet 2015-03-02 06:25:17
@Skynet剛剛更新了這個問題 – Sreeji 2015-03-02 06:36:17