• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How would you approach making something like the small player in youtube?

npepperoni

Lurker
I am trying to make an app which utilizes web components in a webview (but not the built in android webview). What we'd like to accomplish, is that when you hit a button you open a full screen activity, but if you go back, that activity doesn't go away completely but stays in a smaller section on the screen, without losing progress, so that you can click on it and open it up again back and forth seamlessly. A common example of this behavior is something like browsing youtube while viewing a video. The player minimizes to right above the bottom bar, allowing you to browse the app while keeping the video playing with the controls in view (note, this is not the same thing as picture in picture, which is what happens if you exit the app completely while viewing a video).

Would fragments allow this behavior? Or is there something more idiomatic I should look into to achieve this dynamic layout?

Here's a visual for what i mean:
upload_2022-7-11_16-34-27.png
 
Back
Top Bottom