Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does PocketCasts do this transition/effect?

PocketCasts material update has an awesome transition animation for their list items onClick. Is this done by adding a view/fragment to the existing Coordinator Layout for the activity? Any ideas on how I can implement this?

LEFT: Shown upon clickin a list item. "Pops up" from bottom. RIGHT: Scrolling the "pop up" brings it to cover the whole screen

like image 902
Phiat Avatar asked Jun 30 '15 18:06

Phiat


2 Answers

It's all custom code based around raw touch events with an OnTouchListener, a GestureDetector (onScroll, onFling, etc) and an OverScroller for helping to calculate the velocity things should travel at.

The view itself is just a class that extends FrameLayout which we move up and down in code.

Source: I wrote it ;)

like image 159
rustyshelf Avatar answered Oct 16 '22 22:10

rustyshelf


Flipboard have open sourced their bottomsheet implementation.

https://github.com/Flipboard/bottomsheet

It might be worth checking it out before you try to write your own version, @rustyshelf is a genius and it is near impossible. ;)

like image 5
Geekygecko Avatar answered Oct 16 '22 21:10

Geekygecko