Android画布绘制一个形状并将其从位置A移动到具有动画持续时间的B.

时间:2016-03-04 11:17:48

标签: java android android-animation android-canvas

我一直在寻找如何绘制形状并在使用画布从a点移动到b点时添加持续时间的几个小时。

例如我有:

SELECT * , CONCAT(  `project` ,  `report_date` ,  `percentage` ) AS uniq
FROM  `table_name` 
GROUP BY  IF(`percentage`=100,`project`,`uniq` )
ORDER BY `project`, `report_date`

绘制圆圈并旋转90度,移动到x,y位置。问题是它直接到达该位置。我希望我有一个持续时间,以便用户看到它在x或y轴上从A点移动到B点。

示例:

方块将从x_position开始:0和u_position:0。然后超过5秒,它将移动到位置x_position:50和y_position:50。

有没有更好的方法来实现这一目标?我假设有一个更好的方法来实现这一目标。

我尝试了以下内容:

  1. http://www.compiletimeerror.com/2013/09/introduction-to-2d-drawing-in-android.html#.VtlEM_krKUk

  2. Rotating Image on A canvas in android

  3. How to draw a circle with animation in android with circle size based on a value

  4. 我相信这是正确的部分但是我无法实现这一点:

    1. How to make 2D graphic transition in android canvas

0 个答案:

没有答案