in quizdemo/src/main/java/com/amazonaws/ivs/player/quizdemo/activities/MainActivity.kt [150:171]
override fun onLayoutChange(
v: View?,
left: Int,
top: Int,
right: Int,
bottom: Int,
oldLeft: Int,
oldTop: Int,
oldRight: Int,
oldBottom: Int
) {
if (left != oldLeft || top != oldTop || right != oldRight || bottom != oldBottom) {
val width = viewModel.playerParamsChanged.value?.first
val height = viewModel.playerParamsChanged.value?.second
if (width != null && height != null) {
surface_view.post {
Log.d(TAG, "On rotation player layout params changed $width $height")
ViewUtil.setLayoutParams(surface_view, width, height)
}
}
}
}