From f95950cb80057cd0747db5ec0c9fabb83f53124e Mon Sep 17 00:00:00 2001 From: Tin Pham Date: Tue, 28 Nov 2023 18:32:55 -0800 Subject: [PATCH] update the uploaded image to be fit in the box --- .../java/com/example/belindas_closet/screen/AddProduct.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/example/belindas_closet/screen/AddProduct.kt b/app/src/main/java/com/example/belindas_closet/screen/AddProduct.kt index d9848173..9bfa1b5e 100644 --- a/app/src/main/java/com/example/belindas_closet/screen/AddProduct.kt +++ b/app/src/main/java/com/example/belindas_closet/screen/AddProduct.kt @@ -359,7 +359,7 @@ fun ImageUploadButton(onImagePicked: (Uri?) -> Unit) { val boxSize = Modifier .fillMaxWidth() .padding(12.dp) - .height(350.dp) + .height(200.dp) Box( modifier = boxSize @@ -390,7 +390,7 @@ fun ImageUploadButton(onImagePicked: (Uri?) -> Unit) { painter = rememberAsyncImagePainter(model = uri), contentDescription = stringResource(id = R.string.product_image_picker_product_image), modifier = boxSize, - contentScale = ContentScale.Crop + contentScale = ContentScale.Fit ) } }