fix(android): resize mode cover calculation (#4010)
This commit is contained in:
parent
ab7e02e453
commit
9f382163d8
@ -75,9 +75,9 @@ class AspectRatioFrameLayout(context: Context) : FrameLayout(context) {
|
|||||||
|
|
||||||
// Scale video if it doesn't fill the measuredWidth
|
// Scale video if it doesn't fill the measuredWidth
|
||||||
if (width < measuredWidth) {
|
if (width < measuredWidth) {
|
||||||
val scaleFactor: Int = measuredWidth / width
|
val scaleFactor: Float = measuredWidth.toFloat() / width
|
||||||
width *= scaleFactor
|
width = (scaleFactor * width).toInt()
|
||||||
height = measuredHeight * scaleFactor
|
height = (scaleFactor * height).toInt()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user