I have a webview in which video is played, if you set the size of the webview, for example, 200 to 200, then everything is ok, but when installed programmatically
android:layout_width="match_parent"
android:layout_height="wrap_content"
then the video disappears from the screen, the screen becomes black. While the stream from the video continues to play as the music from the video continues to play. How I can fix it ?
<androidx.core.widget.NestedScrollView
android:id="@+id/webScrollContainer"
android:layout_width="200sp"
android:layout_height="200sp"
android:fillViewport="true"
android:visibility="@{playerType == PlayerViewType.WEB ? View.VISIBLE : View.GONE}"
tools:visibility="visible">
<com.onixcamera.ui.view.custom.SizableWebView
android:id="@+id/testWebView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:fillViewport="true"
android:focusable="true"
android:isScrollContainer="false"
android:visibility="visible"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:layout_scrollFlags="scroll|exitUntilCollapsed" />
</androidx.core.widget.NestedScrollView>
...
binding.testWebView.loadUrl(url)