Android uidesign: Share a QQ-like chat message prompting you to drag bubbles, androidui

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.