Open DanielJMorrissey opened 4 years ago
Hi, I just added an answer to a similar issue (how to use the fullscreen) on Stack Overflow. In a nutshell:
.getPlayerUiController().setFullScreenButtonClickListener
remove the YT player View from the layout (eg. trailerLayout) and add the same YT player View into the fullscreen layout;Consider it as a "fake" fullscreen" - you are rotating the whole layout while remaining in portrait mode :-)
Hi, I just added an answer to a similar issue (how to use the fullscreen) on Stack Overflow. In a nutshell:
- create a layout for fullscreen and add it to the parent layout;
- in the
.getPlayerUiController().setFullScreenButtonClickListener
remove the YT player View from the layout (eg. trailerLayout) and add the same YT player View into the fullscreen layout;- when exiting fullscreen, remove the YT player View from the fullscreen layout and add the same YT player View into the trailerLayout.
Consider it as a "fake" fullscreen" - you are rotating the whole layout while remaining in portrait mode :-)
Do you have this in Java?
Do you have this in Java?
Hi, unfortunately not, I have it only in Kotlin. But thanks to the similarities between Kotlin and Java, it should be very similar.
Do you have this in Java?
Hi, unfortunately not, I have it only in Kotlin. But thanks to the similarities between Kotlin and Java, it should be very similar.
I've migrated my app to Kotlin just for this and the code seems to not work for some reason. Can I contact you privately? I've been struggling with this for days and would appreciate the help.
Yes, of course, feel free to contact me via e-mail (in my profile) - although I am not a skilled developer, I am just learning how to code :-)
Sent an email
Hello,
I am new to coding so I am learning how to create an app. So far I managed to create an app with 3 youtube videos using the XML and shown the full-screen button.
In non-fullscreen mode, the edges of the youtube videos are not visible but the video plays fine. Upon testing it, when I click on the full-screen button the edges become visible but it does not fill the screen of the phone.
I tried looking for fullscreen listeners online but have failed in finding one or in how to use it.
Would you know how to create a full-screen listener? I don't have any Java so far