fix: 달력 스와이프 애니메이션 버그 수정
- 스와이프 제스처로 월 이동 시 animateMonthTransition() 호출하도록 수정 - 이전/다음 월 버튼과 동일한 애니메이션 적용 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -157,12 +157,10 @@ class MainActivity : AppCompatActivity() {
|
||||
if (abs(diffX) > SWIPE_THRESHOLD && abs(velocityX) > SWIPE_VELOCITY_THRESHOLD) {
|
||||
if (diffX > 0) {
|
||||
// Swipe Right -> Previous Month
|
||||
currentViewMonth = currentViewMonth.minusMonths(1)
|
||||
updateCalendar()
|
||||
animateMonthTransition(-1)
|
||||
} else {
|
||||
// Swipe Left -> Next Month
|
||||
currentViewMonth = currentViewMonth.plusMonths(1)
|
||||
updateCalendar()
|
||||
animateMonthTransition(1)
|
||||
}
|
||||
return true
|
||||
}
|
||||
@@ -735,9 +733,9 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
updateCalendar()
|
||||
|
||||
// Reset position for incoming animation (keep scale at 0.95f for continuity)
|
||||
card.translationX = if (direction > 0) width else -width
|
||||
card.scaleX = 0.95f
|
||||
card.scaleY = 0.95f
|
||||
card.alpha = 0.7f
|
||||
|
||||
card.animate()
|
||||
.translationX(0f)
|
||||
|
||||
Reference in New Issue
Block a user