-
Notifications
You must be signed in to change notification settings - Fork 1
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
[UI/#20] 캘린더뷰 / 주간 캘린더 구현 #33
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
와 진짜 퀄리티 미쳤네요!! 갓 석 준!!! 최고최고!! 수고하셨습니당~!!
val swipeDirection = (listState.firstVisibleItemIndex - currentPage).coerceIn(-1, 1).toLong() | ||
.collect { | ||
val swipeDirection = | ||
(listState.firstVisibleItemIndex - currentPage).coerceIn(-1, 1).toLong() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오!! coerceIn() 처음 보는 것 같은데!! 새로운거 알아갑니당ㅎㅎ
) { | ||
Card( | ||
modifier = Modifier | ||
.border(0.dp, Grey200, RoundedCornerShape(bottomStart = 20.dp, bottomEnd = 20.dp)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
줄바꿈 해주는게 쪼끔 더 가독성이 좋을 것 같아요!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
border에도 named argument 달아주는 것도 좋을 것 같네용
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
석준오빠,, 못하는 게 뭐죠,,,,,? 진짜 최고야,,,
var currentDate by remember { mutableStateOf(LocalDate.now()) } | ||
var currentPage by remember { mutableIntStateOf(listState.firstVisibleItemIndex) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요거 rememberSaveable로 해야 되나 했는데 저희 서비스는 가로모드 대응 안 하기 때문에 안 바꿔도 될 것 같네용
) { | ||
val selectedDate by viewModel.selectedDate.collectAsState() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
collectAsStateWithLifecycle()
로 바꿔주세요!!
) { | ||
Card( | ||
modifier = Modifier | ||
.border(0.dp, Grey200, RoundedCornerShape(bottomStart = 20.dp, bottomEnd = 20.dp)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
border에도 named argument 달아주는 것도 좋을 것 같네용
_selectedDate.update { currentState -> | ||
currentState.copy( | ||
selectedDate = date, | ||
isEnabled = true | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update라는 속성을 사용했을 때의 이점이 궁금해졌어요..!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이걸어케했어요...? ㅜㅜ 기립박수
) { | ||
val date = selectedDate.selectedDate | ||
val monthData = MonthData(YearMonth.of(date.year, date.monthValue)) | ||
val currentWeek = date.getWeekIndexContainingSelectedDate() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getWeekIndexContainingSelectedDate라는게 있군요,,,,,캘린더란,,,,,,,,
@@ -35,5 +35,6 @@ | |||
<string name="calendar_button_description_previous">previous</string> | |||
<string name="calendar_button_description_next">next</string> | |||
<string name="calendar_button_description_list">list</string> | |||
<string name="calendar_animation_label">Calendar Transition</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string에 Calendar 주석 추가해주시면 좋을 것 같습니답.!
⛳️ Work Description
📸 Screenshot
default.mp4
📢 To Reviewers
경고: 일단 기능을 우선으로 구현을 했기 때문에 코드가 이쁘지 않을 수 있습니다.