Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/178.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 随机移动多个图像视图而不发生碰撞_Android_Algorithm_Android Animation_Game Physics - Fatal编程技术网

Android 随机移动多个图像视图而不发生碰撞

Android 随机移动多个图像视图而不发生碰撞,android,algorithm,android-animation,game-physics,Android,Algorithm,Android Animation,Game Physics,我有一个ImageView~20-25个小图标的列表,它们随机放置在RelativeLayout中,没有重叠 我使用ImageView的左上边距将ImageView设置为view 我想在不发生碰撞的情况下随机移动此ImageView,并且在10秒钟内不会离开屏幕 有什么建议吗?使用SurfaceView并将Rect与位图结合起来location@LunarWatcher你有什么例子吗?使用一个线程,查看它所在的SO文档,以及如何在其上应用随机动画?路径查找。。。

我有一个
ImageView
~20-25个小图标的列表,它们随机放置在
RelativeLayout
中,没有重叠

我使用ImageView的左上边距将ImageView设置为view

我想在不发生碰撞的情况下随机移动此ImageView,并且在10秒钟内不会离开屏幕


有什么建议吗?

使用SurfaceView并将Rect与位图结合起来location@LunarWatcher你有什么例子吗?使用一个线程,查看它所在的SO文档,以及如何在其上应用随机动画?路径查找。。。