From c517fafd0d58939a34332d2d773d31d4e6f9ff75 Mon Sep 17 00:00:00 2001 From: Anil Kumar Beesetti Date: Mon, 21 Aug 2023 08:55:33 +0530 Subject: [PATCH] fix: zoom reset causes layout to doesn't match parent size --- .../anilbeesetti/nextplayer/feature/player/PlayerActivity.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/feature/player/src/main/java/dev/anilbeesetti/nextplayer/feature/player/PlayerActivity.kt b/feature/player/src/main/java/dev/anilbeesetti/nextplayer/feature/player/PlayerActivity.kt index e319bcbfb..01040e556 100644 --- a/feature/player/src/main/java/dev/anilbeesetti/nextplayer/feature/player/PlayerActivity.kt +++ b/feature/player/src/main/java/dev/anilbeesetti/nextplayer/feature/player/PlayerActivity.kt @@ -14,6 +14,7 @@ import android.net.Uri import android.os.Build import android.os.Bundle import android.view.View +import android.view.ViewGroup.LayoutParams import android.view.WindowManager import android.widget.FrameLayout import android.widget.ImageButton @@ -675,8 +676,8 @@ class PlayerActivity : AppCompatActivity() { } private fun resetExoContentFrameWidthAndHeight() { - exoContentFrameLayout.layoutParams.width = binding.playerView.width - exoContentFrameLayout.layoutParams.height = binding.playerView.height + exoContentFrameLayout.layoutParams.width = LayoutParams.MATCH_PARENT + exoContentFrameLayout.layoutParams.height = LayoutParams.MATCH_PARENT exoContentFrameLayout.scaleX = 1.0f exoContentFrameLayout.scaleY = 1.0f exoContentFrameLayout.requestLayout()