Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ Fix ] : 해상도에 따라 다이얼로그의 버튼이 짤리는 현상 수정 #330

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions common/src/main/java/com/yapp/common/yds/YDSPopupDialog.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package com.yapp.common.yds
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.KeyboardOptions
Expand All @@ -28,6 +28,8 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.input.PasswordVisualTransformation
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
Expand Down Expand Up @@ -131,6 +133,7 @@ fun YDSPopupDialog(
Button(
onClick = onClickNegativeButton,
modifier = Modifier
.width(0.dp)
.weight(1f)
.height(46.dp)
.padding(end = 6.dp),
Expand All @@ -143,7 +146,8 @@ fun YDSPopupDialog(
Text(
text = negativeButtonText,
style = AttendanceTypography.body1,
color = AttendanceTheme.colors.grayScale.Gray800
color = AttendanceTheme.colors.grayScale.Gray800,
overflow = TextOverflow.Ellipsis
)
}
}
Expand All @@ -156,6 +160,7 @@ fun YDSPopupDialog(
Button(
onClick = onClickPositiveButton,
modifier = Modifier
.width(0.dp)
.weight(1f)
.height(46.dp)
.then(positiveButtonPadding),
Expand All @@ -168,11 +173,29 @@ fun YDSPopupDialog(
Text(
text = positiveButtonText,
style = AttendanceTypography.body1,
color = Color.White
color = Color.White,
overflow = TextOverflow.Ellipsis
)
}
}
}
}
}
}

@OptIn(ExperimentalComposeUiApi::class)
@Preview(device = "spec:width=480px,height=800px,dpi=240")
@Composable
fun YDSPopupDialogPreview() {
AttendanceTheme {
YDSPopupDialog(
title = "팀을 선택해 주세요",
content = "원활한 출석체크를 위해\\n팀과 직무 선택이 꼭 필요해요!",
negativeButtonText = "취소",
positiveButtonText = "팀 선택하기",
onClickNegativeButton = { },
onClickPositiveButton = { },
onDismiss = { }
)
}
}
2 changes: 1 addition & 1 deletion presentation/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<string name="member_setting_withdraw_dialog_negative_button">취소</string>
<string name="member_setting_withdraw_dialog_positive_button">탈퇴합니다</string>
<string name="member_setting_error_message">오류가 발생했어요. 다시 시도해주세요.</string>
<string name="member_setting_select_team">선택하기</string>
<string name="member_setting_select_team">선택하기</string>

<string name="member_qr_time_inform_text">까지 출석해 주세요.</string>
<string name="member_qr_late_inform_text">30분까지는 지각, 그 이후는 결석으로 처리돼요.</string>
Expand Down
Loading