diff --git a/capture/src/main/kotlin/com/alfresco/capture/ListViewPreview.kt b/capture/src/main/kotlin/com/alfresco/capture/ListViewPreview.kt index 17fee849d..e7fbaf01d 100644 --- a/capture/src/main/kotlin/com/alfresco/capture/ListViewPreview.kt +++ b/capture/src/main/kotlin/com/alfresco/capture/ListViewPreview.kt @@ -65,7 +65,7 @@ class ListViewPreview @JvmOverloads constructor( ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL ) - binding.preview.scaleType = getScaleType(convertOrientationToDegree(rotation), true) + binding.preview.scaleType = getScaleType(convertOrientationToDegree(rotation)) } } @@ -75,7 +75,7 @@ class ListViewPreview @JvmOverloads constructor( val rotation = mediaMetadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION) rotation?.let { - binding.preview.scaleType = getScaleType(it.toInt(), false) + binding.preview.scaleType = getScaleType(it.toInt()) } } @@ -88,15 +88,12 @@ class ListViewPreview @JvmOverloads constructor( } } - private fun getScaleType(rotation: Int, isPhoto: Boolean): ImageView.ScaleType { + private fun getScaleType(rotation: Int): ImageView.ScaleType { val isTablet = context.resources.getBoolean(R.bool.isTablet) return when { isTablet && (rotation == ORIENTATION_0 || rotation == ORIENTATION_180) -> { ImageView.ScaleType.FIT_CENTER } - isPhoto && isTablet && (rotation == ORIENTATION_90 || rotation == ORIENTATION_270) -> { - ImageView.ScaleType.FIT_CENTER - } !isTablet && (rotation == ORIENTATION_180 || rotation == ORIENTATION_0) -> { ImageView.ScaleType.FIT_CENTER } diff --git a/capture/src/main/res/layout-sw600dp/view_list_preview.xml b/capture/src/main/res/layout-sw600dp/view_list_preview.xml index c6b39625e..572910618 100644 --- a/capture/src/main/res/layout-sw600dp/view_list_preview.xml +++ b/capture/src/main/res/layout-sw600dp/view_list_preview.xml @@ -10,7 +10,7 @@ diff --git a/capture/src/main/res/layout/view_list_preview.xml b/capture/src/main/res/layout/view_list_preview.xml index 6d588eaf0..97a884cbe 100644 --- a/capture/src/main/res/layout/view_list_preview.xml +++ b/capture/src/main/res/layout/view_list_preview.xml @@ -11,7 +11,7 @@ android:layout_width="wrap_content" app:strokeWidth="2dp" app:strokeColor="@color/alfresco_gray_900_15" - android:layout_height="320dp" + android:layout_height="280dp" android:layout_gravity="center_horizontal" app:cardCornerRadius="8dp" app:cardElevation="0dp"> diff --git a/capture/src/main/res/values/attrs.xml b/capture/src/main/res/values/attrs.xml index dd70d6b2c..613ad03d0 100644 --- a/capture/src/main/res/values/attrs.xml +++ b/capture/src/main/res/values/attrs.xml @@ -1,6 +1,7 @@ 24dp + 28dp 32dp 16dp 40dp