首页 > 解决方案 > How do I let the user move a circle into another circles by dragging it in Android?

问题描述

At the start I want the user to see:

enter image description here

The then want to give the user the choice to be able to drag H or C into the circle, so that it looks like:

enter image description here

This means while the user drags the H into the circles the other items that are already in the circle are have to move to make space for it. Ideally I would want them to be evenly distributed in the bigger circle. To have a nice UX I want the transition between the two images to be visible.

How do I best implement this UI?

标签: androidandroid-layout

解决方案


最好的方法是使用单独的重叠图像视图来构建大图像并为每个部分图像使用单独的图像视图。然后使用 imageview.setOnDragListener() 拖动图像和 imgview.setOnTouchListener() 创建阴影。研究这个,你一定会做到的。


推荐阅读