简体   繁体   中英

How move a view to the nearest edge of the screen?

I'm trying to achieve something similar to what (Facebook) Messenger's ChatHeads does after the user stops interacting with the view, its just snaps to the nearest edge.

I also tried using the overshoot animation but I couldn't get it to move to the nearest edge so I removed it.

Any help would be greatly appreciated, Thanks.

I implemented it once using this Medium tutorial. Worked like a charm.

Chat Heads Bubbles: Credit: @kevalpatel2106

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM