fix: 애니메이션 개선 및 APK 업데이트
- ViewPropertyAnimator 사용으로 더 부드러운 전환 - alpha 애니메이션 추가로 시각적 효과 개선 - APK URL 업데이트 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
12
.env.local
Normal file
12
.env.local
Normal file
@@ -0,0 +1,12 @@
|
||||
# 로컬 설정 파일
|
||||
|
||||
## Personal Access Token (Gitea)
|
||||
- 토큰: `e3b515eaa0a6683c921ca3bf718e281ed30a6075`
|
||||
- 용도: git.webpluss.net API 접근 (Release 업로드, version.json 업데이트)
|
||||
- **Git에 Commit되지 않도록 주의**
|
||||
|
||||
## 사용 예시
|
||||
```bash
|
||||
curl -u "sanjeok77:e3b515eaa0a6683c921ca3bf718e281ed30a6075" \
|
||||
"https://git.webpluss.net/api/v1/repos/sanjeok77/NeFLIX/releases"
|
||||
```
|
||||
BIN
.env.local:Zone.Identifier
Normal file
BIN
.env.local:Zone.Identifier
Normal file
Binary file not shown.
@@ -35,27 +35,6 @@ fun showCustomToast(context: Context, message: String, duration: Int = android.w
|
||||
// Fallback to default toast if custom toast fails
|
||||
android.widget.Toast.makeText(context, message, duration).show()
|
||||
}
|
||||
}
|
||||
* 다크모드 지원 커스텀 토스트 표시
|
||||
*/
|
||||
fun showCustomToast(context: Context, message: String, duration: Int = android.widget.Toast.LENGTH_SHORT) {
|
||||
try {
|
||||
// Use application context with theme for proper dark mode support
|
||||
val themedContext = android.view.ContextThemeWrapper(context.applicationContext, R.style.Theme_ShiftAlarm)
|
||||
val inflater = android.view.LayoutInflater.from(themedContext)
|
||||
val layout = inflater.inflate(R.layout.custom_toast, null)
|
||||
val textView = layout.findViewById<android.widget.TextView>(R.id.toastText)
|
||||
textView.text = message
|
||||
|
||||
val toast = android.widget.Toast(context.applicationContext)
|
||||
toast.duration = duration
|
||||
toast.view = layout
|
||||
toast.setGravity(android.view.Gravity.BOTTOM or android.view.Gravity.CENTER_HORIZONTAL, 0, 100)
|
||||
toast.show()
|
||||
} catch (e: Exception) {
|
||||
// Fallback to default toast if custom toast fails
|
||||
android.widget.Toast.makeText(context, message, duration).show()
|
||||
}
|
||||
}
|
||||
// ============================================
|
||||
// 알람 ID 생성
|
||||
|
||||
@@ -706,37 +706,39 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
private fun animateMonthTransition(direction: Int) {
|
||||
val slideOut = if (direction > 0) {
|
||||
android.view.animation.TranslateAnimation(0f, -binding.calendarCard.width.toFloat(), 0f, 0f)
|
||||
} else {
|
||||
android.view.animation.TranslateAnimation(0f, binding.calendarCard.width.toFloat(), 0f, 0f)
|
||||
}
|
||||
slideOut.duration = 150
|
||||
slideOut.fillAfter = false
|
||||
|
||||
val slideIn = if (direction > 0) {
|
||||
android.view.animation.TranslateAnimation(binding.calendarCard.width.toFloat(), 0f, 0f, 0f)
|
||||
} else {
|
||||
android.view.animation.TranslateAnimation(-binding.calendarCard.width.toFloat(), 0f, 0f, 0f)
|
||||
}
|
||||
slideIn.duration = 150
|
||||
slideIn.fillAfter = true
|
||||
|
||||
binding.calendarCard.startAnimation(slideOut)
|
||||
val card = binding.calendarCard
|
||||
val width = card.width.toFloat()
|
||||
|
||||
slideOut.setAnimationListener(object : android.view.animation.Animation.AnimationListener {
|
||||
override fun onAnimationStart(animation: android.view.animation.Animation?) {}
|
||||
override fun onAnimationRepeat(animation: android.view.animation.Animation?) {}
|
||||
override fun onAnimationEnd(animation: android.view.animation.Animation?) {
|
||||
if (width == 0f) {
|
||||
currentViewMonth = if (direction > 0) {
|
||||
currentViewMonth.plusMonths(1)
|
||||
} else {
|
||||
currentViewMonth.minusMonths(1)
|
||||
}
|
||||
updateCalendar()
|
||||
return
|
||||
}
|
||||
|
||||
card.animate()
|
||||
.translationX(if (direction > 0) -width else width)
|
||||
.alpha(0.5f)
|
||||
.setDuration(200)
|
||||
.withEndAction {
|
||||
currentViewMonth = if (direction > 0) {
|
||||
currentViewMonth.plusMonths(1)
|
||||
} else {
|
||||
currentViewMonth.minusMonths(1)
|
||||
}
|
||||
updateCalendar()
|
||||
binding.calendarCard.startAnimation(slideIn)
|
||||
|
||||
card.translationX = if (direction > 0) width else -width
|
||||
card.animate()
|
||||
.translationX(0f)
|
||||
.alpha(1f)
|
||||
.setDuration(200)
|
||||
.start()
|
||||
}
|
||||
})
|
||||
.start()
|
||||
}
|
||||
|
||||
private fun formatRemainingDays(days: Float): String {
|
||||
|
||||
@@ -108,11 +108,4 @@ class ShiftRepository(private val context: Context) {
|
||||
))
|
||||
}
|
||||
}
|
||||
val annualLeave = dao.getAnnualLeave()
|
||||
annualLeave?.let {
|
||||
val usedDays = calculateUsedAnnualLeave()
|
||||
val remainingDays = it.totalDays - usedDays
|
||||
dao.insertAnnualLeave(it.copy(remainingDays = remainingDays))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
android:id="@+id/shiftChar"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_height="40dp"
|
||||
|
||||
android:gravity="center"
|
||||
android:text="주"
|
||||
android:textSize="15sp"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"versionCode": 1148,
|
||||
"versionName": "1.4.8",
|
||||
"apkUrl": "https://git.webpluss.net/attachments/731ca456-b7f3-4634-8b8d-05dbf21e3895",
|
||||
"apkUrl": "https://git.webpluss.net/attachments/b84726d9-cebb-4ffe-a452-6f0aefbcce93",
|
||||
"changelog": "v1.4.8: 달력 월 이동 시 부드러운 화면 전환 애니메이션 추가",
|
||||
"forceUpdate": false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user