Skip to content

Commit 082ae06

Browse files
committed
♻️ Refactor: CameraPreviewBox 반응형 레이아웃 대응
1 parent 78fc526 commit 082ae06

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

feature/photolog/capture/src/main/java/com/twix/photolog/capture/component/CameraPreviewBox.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ package com.twix.photolog.capture.component
33
import androidx.camera.compose.CameraXViewfinder
44
import androidx.compose.foundation.border
55
import androidx.compose.foundation.layout.Box
6+
import androidx.compose.foundation.layout.aspectRatio
67
import androidx.compose.foundation.layout.fillMaxSize
8+
import androidx.compose.foundation.layout.fillMaxWidth
79
import androidx.compose.foundation.layout.padding
8-
import androidx.compose.foundation.layout.size
910
import androidx.compose.foundation.shape.RoundedCornerShape
1011
import androidx.compose.runtime.Composable
1112
import androidx.compose.ui.Modifier
@@ -35,7 +36,8 @@ fun CameraPreviewBox(
3536
Box(
3637
modifier =
3738
modifier
38-
.size(375.66.dp)
39+
.fillMaxWidth()
40+
.aspectRatio(1f)
3941
.padding(horizontal = 5.dp)
4042
.onGloballyPositioned { coordinates ->
4143
onPositioned(coordinates.boundsInParent().bottom)

0 commit comments

Comments
 (0)