File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
easyplayer2/src/main/java/loli/ball/easyplayer2 Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 11package loli.ball.easyplayer2
22
33import android.view.ViewGroup
4+ import android.widget.FrameLayout
45import androidx.compose.foundation.background
56import androidx.compose.foundation.layout.*
67import androidx.compose.runtime.*
@@ -115,14 +116,16 @@ fun EasyPlayer(
115116 AndroidView (
116117 modifier = Modifier .fillMaxSize(),
117118 factory = {
119+ val root = FrameLayout (it)
118120 vm.surfaceView.apply {
119121 kotlin.runCatching {
120122 (parent as ? ViewGroup )?.removeView(this )
123+ root.addView(this , ViewGroup .LayoutParams (ViewGroup .LayoutParams .MATCH_PARENT , ViewGroup .LayoutParams .MATCH_PARENT ))
121124 }.onFailure {
122125 it.printStackTrace()
123126 }
124-
125127 }
128+ root
126129 }
127130 )
128131 }
You can’t perform that action at this time.
0 commit comments