How to implement this smooth slide up and slide down in a android video player app using bottomsheet?

104 views Asked by At

I'm currently trying to make a video player app to stream videos in android using kotlin. The video player is a Exoplayer. I wanted to know how to implement the video player in a bottom sheet and produce the same effect as of the YouTube app. If I slide down the player should minimize and fit to the bottom left of the screen and should expand on slide up. The content like video name and description should fade same as it fades in the YouTube app.

This is what I want to do.

enter image description here

I tried implementing the solution using bottomsheet callback, where I used the onSlide method with the slideoffset to gradually decrease and increase the height and width of the video player view. the height of the player does change, but the transition is not smooth and video player becomes glitchy, either it expands too much or contracts too small. And also i tried using the scaleY to increase and decrease the scale, which resulted in a super scaled video player screen.

0

There are 0 answers