\ v1.0.1 - \uc54c\ub78c \ubc18\ubcf5 \ud69f\uc218 \uc120\ud0dd \ubc84\uadf8 \uc218\uc815 \ub2ec\ub825 \uc0c1\ub2e8 \uc5f0\uc7a5\uadfc\ubb34 \uc778\ub514\uace0 \uceec\ub7ec \uac1c\ud3b8 \uc54c\ub78c \uadf8\ub8f9 \uc544\ucf54\ub514\uc5b8 \ubc0f +/x \ud68c\uc804 \uc560\ub2c8\uba54\uc774\uc158 uc801uc6a9\
This commit is contained in:
@@ -247,16 +247,31 @@ class FragmentSettingsAlarm : Fragment(), SharedPreferences.OnSharedPreferenceCh
|
||||
visibility = if (isCollapsed) View.GONE else View.VISIBLE
|
||||
}
|
||||
|
||||
// Click header to collapse/expand
|
||||
// Click header to collapse/expand with smooth accordion animation
|
||||
headerView.setOnClickListener {
|
||||
if (collapsedGroups.contains(category)) {
|
||||
val willExpand = collapsedGroups.contains(category)
|
||||
|
||||
// 1. Smooth accordion expand/collapse transition
|
||||
val transition = android.transition.AutoTransition().apply {
|
||||
duration = 250
|
||||
interpolator = android.view.animation.AccelerateDecelerateInterpolator()
|
||||
}
|
||||
android.transition.TransitionManager.beginDelayedTransition(container, transition)
|
||||
|
||||
// 2. Smooth rotation between '+' (0 deg) and 'x' (45 deg)
|
||||
val targetRotation = if (willExpand) 45f else 0f
|
||||
ivExpand.animate()
|
||||
.rotation(targetRotation)
|
||||
.setDuration(250)
|
||||
.setInterpolator(androidx.core.view.animation.PathInterpolatorCompat.create(0.22f, 1.0f, 0.36f, 1.0f))
|
||||
.start()
|
||||
|
||||
if (willExpand) {
|
||||
collapsedGroups.remove(category)
|
||||
childrenContainer.visibility = View.VISIBLE
|
||||
ivExpand.rotation = 45f
|
||||
} else {
|
||||
collapsedGroups.add(category)
|
||||
childrenContainer.visibility = View.GONE
|
||||
ivExpand.rotation = 0f
|
||||
}
|
||||
}
|
||||
|
||||
@@ -511,6 +526,13 @@ class FragmentSettingsAlarm : Fragment(), SharedPreferences.OnSharedPreferenceCh
|
||||
btn.setTextColor(if (isSelected) ContextCompat.getColor(requireContext(), R.color.white) else ContextCompat.getColor(requireContext(), R.color.text_secondary))
|
||||
}
|
||||
}
|
||||
updateRepeatUI()
|
||||
repeatButtons.forEachIndexed { i, btn ->
|
||||
btn.setOnClickListener {
|
||||
selectedRepeat = repeatValues[i]
|
||||
updateRepeatUI()
|
||||
}
|
||||
}
|
||||
// Pre-Alarm Buttons
|
||||
var selectedPreAlarm = 15
|
||||
val preAlarmButtons = listOf(
|
||||
|
||||
Reference in New Issue
Block a user