From 15f314d29ad8608fae3a3a7511ff4d5ea041cd78 Mon Sep 17 00:00:00 2001 From: RRaideRR Date: Mon, 3 Jun 2024 00:24:37 +0200 Subject: [PATCH] [video][android] Fix "cover" and "fill" content fit (#29364) --- packages/expo-video/CHANGELOG.md | 2 ++ .../android/src/main/java/expo/modules/video/ContentFit.kt | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/expo-video/CHANGELOG.md b/packages/expo-video/CHANGELOG.md index ef5c40869d153..ee4252c8ee31a 100644 --- a/packages/expo-video/CHANGELOG.md +++ b/packages/expo-video/CHANGELOG.md @@ -10,6 +10,8 @@ ### 🐛 Bug fixes +- [Android] Fix wrong content fit "fill" and "cover". ([#29364](https://github.com/expo/expo/pull/29364) by [@RRaideRR](https://github.com/RRaideRR)) + ### 💡 Others ## 1.1.10 - 2024-05-29 diff --git a/packages/expo-video/android/src/main/java/expo/modules/video/ContentFit.kt b/packages/expo-video/android/src/main/java/expo/modules/video/ContentFit.kt index 951f42f0e1c79..f027108f0b18a 100644 --- a/packages/expo-video/android/src/main/java/expo/modules/video/ContentFit.kt +++ b/packages/expo-video/android/src/main/java/expo/modules/video/ContentFit.kt @@ -12,8 +12,8 @@ enum class ContentFit(val value: String) : Enumerable { fun toResizeMode(): Int { return when (this) { CONTAIN -> AspectRatioFrameLayout.RESIZE_MODE_FIT - FILL -> AspectRatioFrameLayout.RESIZE_MODE_ZOOM - COVER -> AspectRatioFrameLayout.RESIZE_MODE_FILL + FILL -> AspectRatioFrameLayout.RESIZE_MODE_FILL + COVER -> AspectRatioFrameLayout.RESIZE_MODE_ZOOM } } }