Skip to content

Commit

Permalink
네트워크 에러 다이얼로그 최대 가로 길이 제한
Browse files Browse the repository at this point in the history
  • Loading branch information
easyhooon committed Nov 16, 2023
1 parent 16183a3 commit 11dae8a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
Expand All @@ -17,6 +18,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.style.TextAlign
Expand All @@ -42,9 +44,12 @@ fun NetworkErrorAlertDialog(
shape = RoundedCornerShape(16.dp),
color = Color.White,
) {
val screenWidth = LocalConfiguration.current.screenWidthDp.dp
val dialogWidth = screenWidth * 0.8f // 화면 너비의 90%

Column(
modifier = modifier
.fillMaxWidth()
.widthIn(max = dialogWidth)
.padding(top = 24.dp),
) {
Image(
Expand Down

0 comments on commit 11dae8a

Please sign in to comment.