Skip to content

Commit

Permalink
fix: zoom reset causes layout to doesn't match parent size
Browse files Browse the repository at this point in the history
  • Loading branch information
anilbeesetti committed Aug 21, 2023
1 parent 3960c19 commit c517faf
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit c517faf

Please sign in to comment.