Android Question How to add Exoplayer view to Overlay window?

JohnC

Expert
Licensed User
Longtime User
I am using the OverlayWindow from this lib:


And I am trying to add the SimpleExoPlayerView to the overlay panel by trying to load in a layout that just contains the SimpleExoPlayerView:

B4X:
'Creates the overlay window
MaxWidth = GetDeviceLayoutValues.Width
MaxHeight = GetDeviceLayoutValues.Height
  
OW.Initialize2(10dip, 10dip, MaxWidth / 2,  MaxHeight /2, "Pnl")

OW.Panel.LoadLayout("justexo")

But it crashes when I try to load the layout:

B4X:
java.lang.RuntimeException: java.lang.NullPointerException: Attempt to invoke virtual method 'int anywheresoftware.b4a.BALayout.getWidth()' on a null object reference


Any ideas how to fix?
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…