Android uidesign: Share a QQ-like chat message prompting you to drag bubbles, androidui
First
Features:
1. Can be dragged at any time
2. If the drag is too long, the system will listen.
3. When the return result is dragged, it has a bounce effect.
This effect is based on the two versions of github on the Internet. But they are not as ideal as they are.
1. One of the two layers is the textview control and the other is the surfaceview. The test results are good, but the efficiency is not high. There is a flash in the just-clicked figure. Frame jump. So I gave up this method. However, it can be dragged in full screen mode.
2. The other implementation method is very good. One view is complete, all of which are self-painted and no controls are used. In addition, the beiser curve is the thin one in the middle. As the distance gets thinner, the two beiser curves are clamped and it is very convenient to draw with the built-in Path. It is easier than the first method, but the fatal weakness is that full screen drag is not allowed. Once the parent region is limited, the drag range cannot exceed the parent level.
3. So I learned the essence of these two types, and now I am doing this, the code is streamlined, and I also added a loose bounce animation. I feel good about myself. Don't laugh.
The following is the github source code:
Https://github.com/younfor/BubbleDrag
Reprinted please indicate from younfor.com