Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
975413a2d6 | ||
|
|
696083060d | ||
|
|
d245aeb7d5 | ||
|
|
f5b2f72a0b |
@@ -20,8 +20,8 @@ android {
|
|||||||
applicationId = "com.example.shiftalarm"
|
applicationId = "com.example.shiftalarm"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 102
|
versionCode = 106
|
||||||
versionName = "1.0.2"
|
versionName = "1.0.6"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,50 +185,68 @@ class AlarmActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setupControls() {
|
private fun setupControls() {
|
||||||
|
val snoozeInterval = intent.getIntExtra("EXTRA_SNOOZE_INTERVAL", 5)
|
||||||
|
binding.tvSnoozeText.text = "다시 울림 (${snoozeInterval}분)"
|
||||||
|
|
||||||
binding.btnSnooze.setOnClickListener {
|
binding.btnSnooze.setOnClickListener {
|
||||||
handleSnooze()
|
handleSnooze()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Swipe-to-dismiss for Stop Button
|
// Omni-directional Swipe & Tap to Dismiss (Samsung One UI Clock Style)
|
||||||
var startX = 0f
|
var startX = 0f
|
||||||
|
var startY = 0f
|
||||||
|
var isMoved = false
|
||||||
val dismissBtn = binding.btnDismiss
|
val dismissBtn = binding.btnDismiss
|
||||||
val maxSwipe = dpToPx(100f).toFloat()
|
val maxSwipe = dpToPx(80f).toFloat()
|
||||||
|
|
||||||
dismissBtn.setOnTouchListener { v, event ->
|
dismissBtn.setOnTouchListener { v, event ->
|
||||||
when (event.action) {
|
when (event.action) {
|
||||||
MotionEvent.ACTION_DOWN -> {
|
MotionEvent.ACTION_DOWN -> {
|
||||||
startX = event.rawX
|
startX = event.rawX
|
||||||
|
startY = event.rawY
|
||||||
|
isMoved = false
|
||||||
v.animate().cancel()
|
v.animate().cancel()
|
||||||
|
v.scaleX = 0.96f
|
||||||
|
v.scaleY = 0.96f
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
MotionEvent.ACTION_MOVE -> {
|
MotionEvent.ACTION_MOVE -> {
|
||||||
val dx = event.rawX - startX
|
val dx = event.rawX - startX
|
||||||
val clampedDx = if (dx > 0) dx.coerceAtMost(maxSwipe) else dx.coerceAtLeast(-maxSwipe)
|
val dy = event.rawY - startY
|
||||||
v.translationX = clampedDx
|
val distance = Math.hypot(dx.toDouble(), dy.toDouble()).toFloat()
|
||||||
|
|
||||||
// Visual feedback: scale up when near trigger
|
if (distance > 10f) {
|
||||||
val ratio = abs(clampedDx) / maxSwipe
|
isMoved = true
|
||||||
v.scaleX = 1f + (ratio * 0.15f)
|
}
|
||||||
v.scaleY = 1f + (ratio * 0.15f)
|
|
||||||
v.alpha = 1f - (ratio * 0.3f)
|
val clampedDx = dx.coerceIn(-maxSwipe, maxSwipe)
|
||||||
|
val clampedDy = dy.coerceIn(-maxSwipe, maxSwipe)
|
||||||
|
v.translationX = clampedDx
|
||||||
|
v.translationY = clampedDy
|
||||||
|
|
||||||
|
val ratio = (distance / maxSwipe).coerceAtMost(1f)
|
||||||
|
v.scaleX = 0.96f + (ratio * 0.18f)
|
||||||
|
v.scaleY = 0.96f + (ratio * 0.18f)
|
||||||
|
binding.pulseCircle.alpha = 0.4f + (ratio * 0.6f)
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> {
|
MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> {
|
||||||
val dx = event.rawX - startX
|
val dx = event.rawX - startX
|
||||||
if (abs(dx) > maxSwipe * 0.8f) {
|
val dy = event.rawY - startY
|
||||||
// Trigger Dismiss
|
val distance = Math.hypot(dx.toDouble(), dy.toDouble()).toFloat()
|
||||||
@Suppress("DEPRECATION")
|
|
||||||
(getSystemService(Context.VIBRATOR_SERVICE) as? Vibrator)?.vibrate(50)
|
// Trigger dismiss if swiped past threshold or tapped
|
||||||
Toast.makeText(this, "알람 해제 완료", Toast.LENGTH_SHORT).show()
|
if (!isMoved || distance > maxSwipe * 0.5f) {
|
||||||
stopAlarm(); finish()
|
triggerDismiss()
|
||||||
} else {
|
} else {
|
||||||
// Reset
|
// Spring back reset
|
||||||
v.animate()
|
v.animate()
|
||||||
.translationX(0f)
|
.translationX(0f)
|
||||||
|
.translationY(0f)
|
||||||
.scaleX(1f)
|
.scaleX(1f)
|
||||||
.scaleY(1f)
|
.scaleY(1f)
|
||||||
.alpha(1f)
|
.setDuration(250)
|
||||||
.setDuration(300)
|
.setInterpolator(android.view.animation.OvershootInterpolator(1.5f))
|
||||||
.start()
|
.start()
|
||||||
}
|
}
|
||||||
true
|
true
|
||||||
@@ -237,17 +255,35 @@ class AlarmActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pulse logic with enhanced glow
|
// Dual Wave Breathing Animation (Samsung Ambient Glow)
|
||||||
fun startPulse() {
|
fun startPulse() {
|
||||||
binding.pulseCircle.scaleX = 0.85f; binding.pulseCircle.scaleY = 0.85f; binding.pulseCircle.alpha = 0.5f
|
binding.pulseCircle.scaleX = 0.8f
|
||||||
|
binding.pulseCircle.scaleY = 0.8f
|
||||||
|
binding.pulseCircle.alpha = 0.3f
|
||||||
|
|
||||||
|
binding.ambientRing.scaleX = 0.9f
|
||||||
|
binding.ambientRing.scaleY = 0.9f
|
||||||
|
binding.ambientRing.alpha = 0.5f
|
||||||
|
|
||||||
binding.pulseCircle.animate()
|
binding.pulseCircle.animate()
|
||||||
.scaleX(1.3f).scaleY(1.3f).alpha(1.0f)
|
.scaleX(1.35f).scaleY(1.35f).alpha(0.8f)
|
||||||
.setDuration(1500)
|
.setDuration(1600)
|
||||||
.withEndAction {
|
.withEndAction {
|
||||||
binding.pulseCircle.animate()
|
binding.pulseCircle.animate()
|
||||||
.scaleX(0.85f).scaleY(0.85f).alpha(0.5f)
|
.scaleX(0.8f).scaleY(0.8f).alpha(0.3f)
|
||||||
.setDuration(1500)
|
.setDuration(1600)
|
||||||
.withEndAction { if(!isFinishing) startPulse() }
|
.withEndAction { if (!isFinishing) startPulse() }
|
||||||
|
.start()
|
||||||
|
}
|
||||||
|
.start()
|
||||||
|
|
||||||
|
binding.ambientRing.animate()
|
||||||
|
.scaleX(1.15f).scaleY(1.15f).alpha(0.85f)
|
||||||
|
.setDuration(1600)
|
||||||
|
.withEndAction {
|
||||||
|
binding.ambientRing.animate()
|
||||||
|
.scaleX(0.9f).scaleY(0.9f).alpha(0.5f)
|
||||||
|
.setDuration(1600)
|
||||||
.start()
|
.start()
|
||||||
}
|
}
|
||||||
.start()
|
.start()
|
||||||
@@ -255,13 +291,35 @@ class AlarmActivity : AppCompatActivity() {
|
|||||||
startPulse()
|
startPulse()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun triggerDismiss() {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
(getSystemService(Context.VIBRATOR_SERVICE) as? Vibrator)?.vibrate(
|
||||||
|
VibrationEffect.createOneShot(50, VibrationEffect.DEFAULT_AMPLITUDE)
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
|
(getSystemService(Context.VIBRATOR_SERVICE) as? Vibrator)?.vibrate(50)
|
||||||
|
}
|
||||||
|
Toast.makeText(this, "알람이 해제되었습니다.", Toast.LENGTH_SHORT).show()
|
||||||
|
stopAlarm()
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
|
||||||
private fun handleSnooze() {
|
private fun handleSnooze() {
|
||||||
@Suppress("DEPRECATION")
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
(getSystemService(Context.VIBRATOR_SERVICE) as? Vibrator)?.vibrate(50)
|
(getSystemService(Context.VIBRATOR_SERVICE) as? Vibrator)?.vibrate(
|
||||||
|
VibrationEffect.createOneShot(50, VibrationEffect.DEFAULT_AMPLITUDE)
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
|
(getSystemService(Context.VIBRATOR_SERVICE) as? Vibrator)?.vibrate(50)
|
||||||
|
}
|
||||||
val snoozeRepeat = intent.getIntExtra("EXTRA_SNOOZE_REPEAT", 3)
|
val snoozeRepeat = intent.getIntExtra("EXTRA_SNOOZE_REPEAT", 3)
|
||||||
val text = if (snoozeRepeat == 99) "다시 울림 설정됨" else "다시 울림 (${snoozeRepeat}회 남음)"
|
val text = if (snoozeRepeat == 99) "다시 울림 설정됨" else "다시 울림 (${snoozeRepeat}회 남음)"
|
||||||
Toast.makeText(this, text, Toast.LENGTH_SHORT).show()
|
Toast.makeText(this, text, Toast.LENGTH_SHORT).show()
|
||||||
snoozeAlarm(); stopAlarm(); finish()
|
snoozeAlarm()
|
||||||
|
stopAlarm()
|
||||||
|
finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun dpToPx(dp: Float): Int {
|
private fun dpToPx(dp: Float): Int {
|
||||||
|
|||||||
@@ -32,6 +32,19 @@ object AlarmSyncManager {
|
|||||||
val alarmId = repo.addCustomAlarm(alarm)
|
val alarmId = repo.addCustomAlarm(alarm)
|
||||||
Log.d(TAG, "알람 DB 추가 완료: ID=$alarmId")
|
Log.d(TAG, "알람 DB 추가 완료: ID=$alarmId")
|
||||||
|
|
||||||
|
// 시스템 알람 볼륨이 0인 경우 최대치로 자동 보정
|
||||||
|
try {
|
||||||
|
val audioManager = context.getSystemService(Context.AUDIO_SERVICE) as android.media.AudioManager
|
||||||
|
val maxVol = audioManager.getStreamMaxVolume(android.media.AudioManager.STREAM_ALARM)
|
||||||
|
val currVol = audioManager.getStreamVolume(android.media.AudioManager.STREAM_ALARM)
|
||||||
|
if (currVol == 0) {
|
||||||
|
audioManager.setStreamVolume(android.media.AudioManager.STREAM_ALARM, maxVol, 0)
|
||||||
|
Log.d(TAG, "알람 볼륨이 0이어서 최대($maxVol)로 자동 설정")
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Log.w(TAG, "볼륨 자동 보정 실패", e)
|
||||||
|
}
|
||||||
|
|
||||||
// 2. AlarmManager에 예약
|
// 2. AlarmManager에 예약
|
||||||
val today = LocalDate.now(SEOUL_ZONE)
|
val today = LocalDate.now(SEOUL_ZONE)
|
||||||
val customAlarms = repo.getAllCustomAlarms()
|
val customAlarms = repo.getAllCustomAlarms()
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ class CalendarAdapter(
|
|||||||
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||||
val root: View = view.findViewById(R.id.dayRoot)
|
val root: View = view.findViewById(R.id.dayRoot)
|
||||||
val dayNumber: TextView = view.findViewById(R.id.dayNumber)
|
val dayNumber: TextView = view.findViewById(R.id.dayNumber)
|
||||||
|
val tvShiftSmall: TextView = view.findViewById(R.id.tvShiftSmall)
|
||||||
val shiftChar: TextView = view.findViewById(R.id.shiftChar)
|
val shiftChar: TextView = view.findViewById(R.id.shiftChar)
|
||||||
val holidayNameSmall: TextView = view.findViewById(R.id.holidayNameSmall)
|
val holidayNameSmall: TextView = view.findViewById(R.id.holidayNameSmall)
|
||||||
val memoIndicator: ImageView = view.findViewById(R.id.memoIndicator)
|
|
||||||
val tvTide: TextView = view.findViewById(R.id.tvTide)
|
val tvTide: TextView = view.findViewById(R.id.tvTide)
|
||||||
val memoContent: TextView = view.findViewById(R.id.memoContent)
|
val memoContent: TextView = view.findViewById(R.id.memoContent)
|
||||||
}
|
}
|
||||||
@@ -71,6 +71,7 @@ class CalendarAdapter(
|
|||||||
val isSaturday = item.date.dayOfWeek == java.time.DayOfWeek.SATURDAY
|
val isSaturday = item.date.dayOfWeek == java.time.DayOfWeek.SATURDAY
|
||||||
val fullHolidayName = HolidayManager.getHolidayName(item.date)
|
val fullHolidayName = HolidayManager.getHolidayName(item.date)
|
||||||
val isToday = item.date == LocalDate.now()
|
val isToday = item.date == LocalDate.now()
|
||||||
|
val hasMemo = item.hasMemo && !item.memoContent.isNullOrEmpty()
|
||||||
|
|
||||||
// Day Number Color
|
// Day Number Color
|
||||||
if (fullHolidayName != null || isSunday) {
|
if (fullHolidayName != null || isSunday) {
|
||||||
@@ -102,82 +103,109 @@ class CalendarAdapter(
|
|||||||
// --- Shift & Holiday Display Logic ---
|
// --- Shift & Holiday Display Logic ---
|
||||||
holder.shiftChar.background = null
|
holder.shiftChar.background = null
|
||||||
holder.shiftChar.text = ""
|
holder.shiftChar.text = ""
|
||||||
|
holder.tvShiftSmall.visibility = View.GONE
|
||||||
holder.holidayNameSmall.visibility = View.GONE
|
holder.holidayNameSmall.visibility = View.GONE
|
||||||
holder.shiftChar.textSize = 18f
|
holder.shiftChar.textSize = 18f
|
||||||
|
|
||||||
// "반월", "반년" (Half-Monthly, Half-Yearly) Special Logic
|
|
||||||
// These are overrides or specific shifts that user sets.
|
|
||||||
// User requested: "월", "년" text. Half-filled background (Red + Transparent).
|
|
||||||
// Check exact string or "startswith" if logic changed?
|
|
||||||
// Logic in adapter `getShift` might return "반월", "반년".
|
|
||||||
|
|
||||||
if (showHolidays && fullHolidayName != null) {
|
if (showHolidays && fullHolidayName != null) {
|
||||||
// Holiday Mode (Priority): Show full holiday name, no circle
|
// Holiday Mode (Priority): Show full holiday name, no circle
|
||||||
holder.shiftChar.text = fullHolidayName
|
holder.shiftChar.text = fullHolidayName
|
||||||
holder.shiftChar.setTextColor(Color.parseColor("#FF5252"))
|
holder.shiftChar.setTextColor(Color.parseColor("#FF5252"))
|
||||||
holder.shiftChar.textSize = 13f
|
holder.shiftChar.textSize = 13f
|
||||||
holder.shiftChar.background = null
|
holder.shiftChar.background = null
|
||||||
|
holder.shiftChar.visibility = View.VISIBLE
|
||||||
} else if (item.shift != null && item.shift != "비번") {
|
} else if (item.shift != null && item.shift != "비번") {
|
||||||
// Shift Mode
|
// Shift Mode
|
||||||
|
val shiftAbbreviation = when (item.shift) {
|
||||||
|
"주간" -> "주"
|
||||||
|
"석간" -> "석"
|
||||||
|
"야간" -> "야"
|
||||||
|
"주간 맞교대" -> "주맞"
|
||||||
|
"야간 맞교대" -> "야맞"
|
||||||
|
"휴무", "휴가" -> "휴"
|
||||||
|
"월차" -> "월"
|
||||||
|
"연차" -> "연"
|
||||||
|
"반월" -> "월"
|
||||||
|
"반년" -> "년"
|
||||||
|
"교육" -> "교"
|
||||||
|
else -> item.shift.take(2)
|
||||||
|
}
|
||||||
|
|
||||||
// Handle specific "Half" cases first
|
val shiftColorRes = when (item.shift) {
|
||||||
if (item.shift == "반월" || item.shift == "반년") {
|
"주간" -> R.color.shift_lemon
|
||||||
holder.shiftChar.text = if (item.shift == "반월") "월" else "년"
|
"석간" -> R.color.shift_seok
|
||||||
holder.shiftChar.setTextColor(ContextCompat.getColor(context, R.color.black)) // Black for contrast on Half Red/Transparent
|
"야간" -> R.color.shift_ya
|
||||||
holder.shiftChar.textSize = 18f
|
"주간 맞교대" -> R.color.shift_jumat
|
||||||
holder.shiftChar.background = ContextCompat.getDrawable(context, R.drawable.bg_shift_half_red)
|
"야간 맞교대" -> R.color.shift_yamat
|
||||||
} else {
|
"휴무", "휴가", "월차", "연차" -> R.color.shift_red
|
||||||
// Standard Logic
|
"반월", "반년" -> R.color.shift_red
|
||||||
val shiftAbbreviation = when (item.shift) {
|
"교육" -> R.color.primary
|
||||||
"주간" -> "주"
|
else -> R.color.text_secondary
|
||||||
"석간" -> "석"
|
}
|
||||||
"야간" -> "야"
|
val shiftColor = ContextCompat.getColor(context, shiftColorRes)
|
||||||
"주간 맞교대" -> "주맞"
|
|
||||||
"야간 맞교대" -> "야맞"
|
|
||||||
"휴무", "휴가" -> "휴"
|
|
||||||
"월차" -> "월"
|
|
||||||
"연차" -> "연"
|
|
||||||
"교육" -> "교"
|
|
||||||
else -> item.shift.take(1)
|
|
||||||
}
|
|
||||||
holder.shiftChar.text = shiftAbbreviation
|
|
||||||
holder.shiftChar.textSize = 20f
|
|
||||||
holder.shiftChar.setTypeface(null, android.graphics.Typeface.BOLD)
|
|
||||||
|
|
||||||
val shiftColorRes = when (item.shift) {
|
if (hasMemo) {
|
||||||
"주간" -> R.color.shift_lemon
|
// When day has a memo: show small shift badge next to day number, hide large center shift circle
|
||||||
"석간" -> R.color.shift_seok
|
holder.shiftChar.visibility = View.GONE
|
||||||
"야간" -> R.color.shift_ya
|
holder.tvShiftSmall.visibility = View.VISIBLE
|
||||||
"주간 맞교대" -> R.color.shift_jumat
|
holder.tvShiftSmall.text = shiftAbbreviation
|
||||||
"야간 맞교대" -> R.color.shift_yamat
|
holder.tvShiftSmall.textSize = if (shiftAbbreviation.length > 1) 7.5f else 9.5f
|
||||||
"휴무", "휴가", "월차", "연차" -> R.color.shift_red
|
holder.tvShiftSmall.setTypeface(null, android.graphics.Typeface.BOLD)
|
||||||
"교육" -> R.color.primary
|
|
||||||
else -> R.color.text_secondary
|
|
||||||
}
|
|
||||||
val shiftColor = ContextCompat.getColor(context, shiftColorRes)
|
|
||||||
|
|
||||||
if (isToday) {
|
if (item.shift == "반월" || item.shift == "반년") {
|
||||||
// Today: Solid Circle
|
holder.tvShiftSmall.text = if (item.shift == "반월") "월" else "년"
|
||||||
val background = ContextCompat.getDrawable(context, R.drawable.bg_shift_solid_v4) as? android.graphics.drawable.GradientDrawable
|
holder.tvShiftSmall.setTextColor(ContextCompat.getColor(context, R.color.black))
|
||||||
background?.setColor(shiftColor)
|
holder.tvShiftSmall.background = ContextCompat.getDrawable(context, R.drawable.bg_shift_half_red)
|
||||||
holder.shiftChar.background = background
|
} else if (isToday) {
|
||||||
holder.shiftChar.backgroundTintList = null
|
val smallBg = ContextCompat.getDrawable(context, R.drawable.bg_shift_solid_v4)?.constantState?.newDrawable()?.mutate() as? android.graphics.drawable.GradientDrawable
|
||||||
|
smallBg?.setColor(shiftColor)
|
||||||
if (item.shift == "주간" || item.shift == "석간") {
|
holder.tvShiftSmall.background = smallBg
|
||||||
holder.shiftChar.setTextColor(ContextCompat.getColor(context, R.color.black))
|
holder.tvShiftSmall.setTextColor(if (item.shift == "주간" || item.shift == "석간") ContextCompat.getColor(context, R.color.black) else Color.WHITE)
|
||||||
} else {
|
|
||||||
holder.shiftChar.setTextColor(Color.WHITE)
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// Not Today: Stroke Circle
|
val smallBg = ContextCompat.getDrawable(context, R.drawable.bg_shift_stroke_v4)?.constantState?.newDrawable()?.mutate() as? android.graphics.drawable.GradientDrawable
|
||||||
val background = ContextCompat.getDrawable(context, R.drawable.bg_shift_stroke_v4) as? android.graphics.drawable.GradientDrawable
|
smallBg?.setStroke(dpToPx(context, 1.2f), shiftColor)
|
||||||
background?.setStroke(dpToPx(context, 1.5f), shiftColor)
|
smallBg?.setColor(Color.TRANSPARENT)
|
||||||
background?.setColor(Color.TRANSPARENT)
|
holder.tvShiftSmall.background = smallBg
|
||||||
|
holder.tvShiftSmall.setTextColor(shiftColor)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// When day has NO memo: standard large centered shift circle
|
||||||
|
holder.shiftChar.visibility = View.VISIBLE
|
||||||
|
holder.tvShiftSmall.visibility = View.GONE
|
||||||
|
|
||||||
holder.shiftChar.background = background
|
if (item.shift == "반월" || item.shift == "반년") {
|
||||||
holder.shiftChar.backgroundTintList = null
|
holder.shiftChar.text = if (item.shift == "반월") "월" else "년"
|
||||||
|
holder.shiftChar.setTextColor(ContextCompat.getColor(context, R.color.black))
|
||||||
|
holder.shiftChar.textSize = 18f
|
||||||
|
holder.shiftChar.background = ContextCompat.getDrawable(context, R.drawable.bg_shift_half_red)
|
||||||
|
} else {
|
||||||
|
holder.shiftChar.text = shiftAbbreviation
|
||||||
|
holder.shiftChar.textSize = 20f
|
||||||
|
holder.shiftChar.setTypeface(null, android.graphics.Typeface.BOLD)
|
||||||
|
|
||||||
holder.shiftChar.setTextColor(shiftColor)
|
if (isToday) {
|
||||||
|
// Today: Solid Circle
|
||||||
|
val background = ContextCompat.getDrawable(context, R.drawable.bg_shift_solid_v4) as? android.graphics.drawable.GradientDrawable
|
||||||
|
background?.setColor(shiftColor)
|
||||||
|
holder.shiftChar.background = background
|
||||||
|
holder.shiftChar.backgroundTintList = null
|
||||||
|
|
||||||
|
if (item.shift == "주간" || item.shift == "석간") {
|
||||||
|
holder.shiftChar.setTextColor(ContextCompat.getColor(context, R.color.black))
|
||||||
|
} else {
|
||||||
|
holder.shiftChar.setTextColor(Color.WHITE)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Not Today: Stroke Circle
|
||||||
|
val background = ContextCompat.getDrawable(context, R.drawable.bg_shift_stroke_v4) as? android.graphics.drawable.GradientDrawable
|
||||||
|
background?.setStroke(dpToPx(context, 1.5f), shiftColor)
|
||||||
|
background?.setColor(Color.TRANSPARENT)
|
||||||
|
|
||||||
|
holder.shiftChar.background = background
|
||||||
|
holder.shiftChar.backgroundTintList = null
|
||||||
|
|
||||||
|
holder.shiftChar.setTextColor(shiftColor)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -187,37 +215,19 @@ class CalendarAdapter(
|
|||||||
holder.holidayNameSmall.visibility = View.VISIBLE
|
holder.holidayNameSmall.visibility = View.VISIBLE
|
||||||
holder.holidayNameSmall.text = fullHolidayName
|
holder.holidayNameSmall.text = fullHolidayName
|
||||||
} else {
|
} else {
|
||||||
// Ensure visibility GONE if not needed (e.g. standard day)
|
holder.holidayNameSmall.visibility = View.GONE
|
||||||
holder.holidayNameSmall.visibility = View.GONE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Double check: if showHolidays=true (Holiday mode), we handled it at top block.
|
|
||||||
// But if showHolidays=true and NO holiday, we show lunar date?
|
|
||||||
// User asked: "Overlap date and holiday text".
|
|
||||||
// My item_day.xml has holidayNameSmall at bottom now.
|
|
||||||
// If showHolidays=true, CalendarAdapter usually HIDES shiftChar and shows Holiday Name?
|
|
||||||
// Wait, standard logic (lines 84-91 above):
|
|
||||||
// If showHolidays && fullHolidayName != null -> shiftChar shows Name.
|
|
||||||
// If showHolidays && fullHolidayName == null -> shiftChar shows LUNAR DATE? (Old logic had this).
|
|
||||||
|
|
||||||
if (showHolidays && fullHolidayName == null) {
|
if (showHolidays && fullHolidayName == null) {
|
||||||
// Show Lunar Date in shiftChar instead of empty?
|
|
||||||
// Or shiftChar is empty, show small text?
|
|
||||||
// Previous code:
|
|
||||||
// holder.shiftChar.text = ""
|
|
||||||
// holder.holidayNameSmall.visibility = View.VISIBLE
|
|
||||||
// holder.holidayNameSmall.text = HolidayManager.getLunarDateString(item.date)
|
|
||||||
|
|
||||||
holder.shiftChar.text = HolidayManager.getLunarDateString(item.date)
|
holder.shiftChar.text = HolidayManager.getLunarDateString(item.date)
|
||||||
holder.shiftChar.textSize = 13f
|
holder.shiftChar.textSize = 13f
|
||||||
holder.shiftChar.setTextColor(ContextCompat.getColor(context, R.color.text_tertiary))
|
holder.shiftChar.setTextColor(ContextCompat.getColor(context, R.color.text_tertiary))
|
||||||
holder.shiftChar.background = null
|
holder.shiftChar.background = null
|
||||||
|
holder.shiftChar.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Memo Content Text (Up to 4 lines in center of day cell)
|
||||||
// Memo Indicator
|
if (hasMemo) {
|
||||||
holder.memoIndicator.visibility = View.GONE // Hide indicator, showing text instead
|
|
||||||
if (item.hasMemo && !item.memoContent.isNullOrEmpty()) {
|
|
||||||
holder.memoContent.visibility = View.VISIBLE
|
holder.memoContent.visibility = View.VISIBLE
|
||||||
holder.memoContent.text = item.memoContent
|
holder.memoContent.text = item.memoContent
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -476,7 +476,18 @@ class FragmentSettingsAlarm : Fragment(), SharedPreferences.OnSharedPreferenceCh
|
|||||||
Log.w("ShiftAlarm", "soundUri가 비어있어 기본값으로 재설정: $currentDialogSoundUri")
|
Log.w("ShiftAlarm", "soundUri가 비어있어 기본값으로 재설정: $currentDialogSoundUri")
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.d("ShiftAlarm", "알람 ${if (isNew) "생성" else "수정"} - 최종 soundUri: $currentDialogSoundUri")
|
// 새 알람 추가 시 또는 볼륨이 0인 경우 시스템 알람 스트림 볼륨을 최대치로 설정
|
||||||
|
try {
|
||||||
|
val audioManager = requireContext().getSystemService(Context.AUDIO_SERVICE) as android.media.AudioManager
|
||||||
|
val maxVol = audioManager.getStreamMaxVolume(android.media.AudioManager.STREAM_ALARM)
|
||||||
|
val currVol = audioManager.getStreamVolume(android.media.AudioManager.STREAM_ALARM)
|
||||||
|
if (isNew || currVol == 0) {
|
||||||
|
audioManager.setStreamVolume(android.media.AudioManager.STREAM_ALARM, maxVol, 0)
|
||||||
|
Log.d("ShiftAlarm", "알람 스트림 볼륨 최대치($maxVol)로 초기화 완료")
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Log.w("ShiftAlarm", "알람 볼륨 설정 실패", e)
|
||||||
|
}
|
||||||
|
|
||||||
fun updateSoundName(uriStr: String?) {
|
fun updateSoundName(uriStr: String?) {
|
||||||
if (uriStr.isNullOrEmpty() || uriStr == "null") {
|
if (uriStr.isNullOrEmpty() || uriStr == "null") {
|
||||||
|
|||||||
@@ -31,6 +31,9 @@ import java.time.YearMonth
|
|||||||
import java.time.format.DateTimeFormatter
|
import java.time.format.DateTimeFormatter
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
|
import android.graphics.Bitmap
|
||||||
|
import android.graphics.Canvas
|
||||||
|
import android.util.Log
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
|
|
||||||
class MainActivity : AppCompatActivity() {
|
class MainActivity : AppCompatActivity() {
|
||||||
@@ -41,6 +44,8 @@ class MainActivity : AppCompatActivity() {
|
|||||||
private var currentViewMonth: YearMonth = YearMonth.now(ShiftCalculator.SEOUL_ZONE)
|
private var currentViewMonth: YearMonth = YearMonth.now(ShiftCalculator.SEOUL_ZONE)
|
||||||
private var currentViewTeam: String = "A"
|
private var currentViewTeam: String = "A"
|
||||||
private lateinit var gestureDetector: GestureDetector
|
private lateinit var gestureDetector: GestureDetector
|
||||||
|
private var calendarAdapter: CalendarAdapter? = null
|
||||||
|
private var isAnimatingMonth = false
|
||||||
|
|
||||||
override fun onConfigurationChanged(newConfig: android.content.res.Configuration) {
|
override fun onConfigurationChanged(newConfig: android.content.res.Configuration) {
|
||||||
super.onConfigurationChanged(newConfig)
|
super.onConfigurationChanged(newConfig)
|
||||||
@@ -261,98 +266,125 @@ class MainActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
private fun setupCalendar() {
|
private fun setupCalendar() {
|
||||||
binding.calendarGrid.layoutManager = GridLayoutManager(this, 7)
|
binding.calendarGrid.layoutManager = GridLayoutManager(this, 7)
|
||||||
|
binding.calendarGrid.itemAnimator = null
|
||||||
updateCalendar()
|
updateCalendar()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateCalendar() {
|
private suspend fun loadCalendarDataForMonth(targetMonth: YearMonth) {
|
||||||
val prefs = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
val prefs = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
||||||
val selectedTeam = prefs.getString(KEY_TEAM, "A") ?: "A"
|
val selectedTeam = prefs.getString(KEY_TEAM, "A") ?: "A"
|
||||||
val factory = prefs.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
val factory = prefs.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
||||||
|
|
||||||
// Today's Shift
|
|
||||||
val today = LocalDate.now(ShiftCalculator.SEOUL_ZONE)
|
val today = LocalDate.now(ShiftCalculator.SEOUL_ZONE)
|
||||||
|
|
||||||
lifecycleScope.launch {
|
val db = AppDatabase.getDatabase(this@MainActivity)
|
||||||
val db = AppDatabase.getDatabase(this@MainActivity)
|
val dao = db.shiftDao()
|
||||||
val dao = db.shiftDao()
|
val repo = ShiftRepository(this@MainActivity)
|
||||||
val repo = ShiftRepository(this@MainActivity)
|
|
||||||
|
|
||||||
// 전체 사용자 알람 로드 (일원화된 Room DB 사용)
|
// 전체 사용자 알람 로드 (일원화된 Room DB 사용)
|
||||||
val allCustomAlarms = repo.getAllCustomAlarms()
|
val allCustomAlarms = repo.getAllCustomAlarms()
|
||||||
|
|
||||||
// 디스플레이 업데이트
|
// 디스플레이 업데이트
|
||||||
if (currentViewTeam == selectedTeam) {
|
if (currentViewTeam == selectedTeam) {
|
||||||
val shiftForMyTeam = withContext(Dispatchers.IO) { repo.getShift(today, selectedTeam, factory) }
|
val shiftForMyTeam = withContext(Dispatchers.IO) { repo.getShift(today, selectedTeam, factory) }
|
||||||
updateAlarmTimeDisplay(today, shiftForMyTeam, factory, allCustomAlarms)
|
updateAlarmTimeDisplay(today, shiftForMyTeam, factory, allCustomAlarms)
|
||||||
binding.alarmTimeText.visibility = android.view.View.VISIBLE
|
binding.alarmTimeText.visibility = android.view.View.VISIBLE
|
||||||
} else {
|
} else {
|
||||||
binding.alarmTimeText.visibility = android.view.View.GONE
|
binding.alarmTimeText.visibility = android.view.View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load overrides and memos for the month
|
// Load overrides and memos for the month
|
||||||
val monthStr = currentViewMonth.toString()
|
val monthStr = targetMonth.toString()
|
||||||
val overrides = withContext(Dispatchers.IO) {
|
val overrides = withContext(Dispatchers.IO) {
|
||||||
dao.getOverridesForMonth(factory, currentViewTeam, monthStr).associateBy { overrideItem -> overrideItem.date }
|
dao.getOverridesForMonth(factory, currentViewTeam, monthStr).associateBy { overrideItem -> overrideItem.date }
|
||||||
}
|
}
|
||||||
val memos = withContext(Dispatchers.IO) {
|
val memos = withContext(Dispatchers.IO) {
|
||||||
dao.getMemosForMonth(monthStr).associateBy { memoItem -> memoItem.date }
|
dao.getMemosForMonth(monthStr).associateBy { memoItem -> memoItem.date }
|
||||||
}
|
}
|
||||||
|
|
||||||
val days = generateDaysForMonthWithData(currentViewMonth, currentViewTeam, factory, overrides, memos)
|
val days = generateDaysForMonthWithData(targetMonth, currentViewTeam, factory, overrides, memos)
|
||||||
|
|
||||||
val adapter = CalendarAdapter(days, object : CalendarAdapter.OnDayClickListener {
|
val availableHeight = binding.calendarGrid.height
|
||||||
|
val calcRowHeight = if (availableHeight > 0) availableHeight / 5 else 0
|
||||||
|
|
||||||
|
if (calendarAdapter == null || binding.calendarGrid.adapter == null) {
|
||||||
|
val newAdapter = CalendarAdapter(days, object : CalendarAdapter.OnDayClickListener {
|
||||||
override fun onDayClick(date: LocalDate, currentShift: String) {
|
override fun onDayClick(date: LocalDate, currentShift: String) {
|
||||||
showDaySettingsDialog(date, currentShift)
|
showDaySettingsDialog(date, currentShift)
|
||||||
}
|
}
|
||||||
}, binding.cbShowHolidays.isChecked)
|
}, binding.cbShowHolidays.isChecked)
|
||||||
|
if (calcRowHeight > 0) {
|
||||||
|
newAdapter.rowHeight = calcRowHeight
|
||||||
|
}
|
||||||
|
calendarAdapter = newAdapter
|
||||||
|
binding.calendarGrid.adapter = newAdapter
|
||||||
|
} else {
|
||||||
|
calendarAdapter?.let { ad ->
|
||||||
|
ad.days = days
|
||||||
|
ad.showHolidays = binding.cbShowHolidays.isChecked
|
||||||
|
if (calcRowHeight > 0) {
|
||||||
|
ad.rowHeight = calcRowHeight
|
||||||
|
}
|
||||||
|
ad.notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
binding.calendarGrid.adapter = adapter
|
binding.monthTitle.text = targetMonth.format(DateTimeFormatter.ofPattern("yyyy년 MM월"))
|
||||||
binding.monthTitle.text = currentViewMonth.format(DateTimeFormatter.ofPattern("yyyy년 MM월"))
|
|
||||||
|
|
||||||
// Dynamic row height: exactly 5 rows visible, 6-row months scroll
|
if (calcRowHeight == 0) {
|
||||||
binding.calendarGrid.post {
|
binding.calendarGrid.post {
|
||||||
val availableHeight = binding.calendarGrid.height
|
val h = binding.calendarGrid.height
|
||||||
if (availableHeight > 0) {
|
if (h > 0) {
|
||||||
val calcRowHeight = availableHeight / 5
|
val rH = h / 5
|
||||||
adapter.rowHeight = calcRowHeight
|
calendarAdapter?.let {
|
||||||
adapter.notifyDataSetChanged()
|
if (it.rowHeight != rH) {
|
||||||
|
it.rowHeight = rH
|
||||||
|
it.notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update Header Status Text with Permission Warning if needed
|
|
||||||
val shiftForViewingTeam = withContext(Dispatchers.IO) { repo.getShift(today, currentViewTeam, factory) }
|
|
||||||
val teamSuffix = if (currentViewTeam == selectedTeam) " (내 반)" else " (${currentViewTeam}반)"
|
|
||||||
|
|
||||||
if (currentViewTeam == selectedTeam && !AlarmPermissionUtil.getExactAlarmStatus(this@MainActivity)) {
|
|
||||||
binding.todayStatusText.text = "⚠️ 정확한 알람 권한이 필요합니다 (설정 필요)"
|
|
||||||
binding.todayStatusText.setTextColor(androidx.core.content.ContextCompat.getColor(this@MainActivity, R.color.warning_red))
|
|
||||||
} else {
|
|
||||||
binding.todayStatusText.text = "오늘의 근무: $shiftForViewingTeam$teamSuffix"
|
|
||||||
binding.todayStatusText.setTextColor(androidx.core.content.ContextCompat.getColor(this@MainActivity, R.color.text_secondary))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update Annual Leave display
|
|
||||||
val annualLeave = withContext(Dispatchers.IO) { repo.getAnnualLeave() }
|
|
||||||
annualLeave?.let {
|
|
||||||
binding.tvAnnualLeave.text = "연차: ${formatRemainingDays(it.remainingDays)}"
|
|
||||||
} ?: run {
|
|
||||||
binding.tvAnnualLeave.text = "연차: --"
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update Shift Summary Chips (v2.2.0)
|
|
||||||
val juCount = days.count { it.date != null && (it.shift == "주간" || it.shift == "주") }
|
|
||||||
val seokCount = days.count { it.date != null && (it.shift == "석간" || it.shift == "석") }
|
|
||||||
val yaCount = days.count { it.date != null && (it.shift == "야간" || it.shift == "야") }
|
|
||||||
val monthlyOvertime = withContext(Dispatchers.IO) { repo.getMonthlyOvertimeHours(currentViewMonth) }
|
|
||||||
|
|
||||||
binding.chipJu.text = "주간 ${juCount}일"
|
|
||||||
binding.chipSeok.text = "석간 ${seokCount}일"
|
|
||||||
binding.chipYa.text = "야간 ${yaCount}일"
|
|
||||||
binding.chipOvertime.text = "연장 ${monthlyOvertime}h"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update Header Status Text with Permission Warning if needed
|
||||||
|
val shiftForViewingTeam = withContext(Dispatchers.IO) { repo.getShift(today, currentViewTeam, factory) }
|
||||||
|
val teamSuffix = if (currentViewTeam == selectedTeam) " (내 반)" else " (${currentViewTeam}반)"
|
||||||
|
|
||||||
|
if (currentViewTeam == selectedTeam && !AlarmPermissionUtil.getExactAlarmStatus(this@MainActivity)) {
|
||||||
|
binding.todayStatusText.text = "⚠️ 정확한 알람 권한이 필요합니다 (설정 필요)"
|
||||||
|
binding.todayStatusText.setTextColor(androidx.core.content.ContextCompat.getColor(this@MainActivity, R.color.warning_red))
|
||||||
|
} else {
|
||||||
|
binding.todayStatusText.text = "오늘의 근무: $shiftForViewingTeam$teamSuffix"
|
||||||
|
binding.todayStatusText.setTextColor(androidx.core.content.ContextCompat.getColor(this@MainActivity, R.color.text_secondary))
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update Annual Leave display
|
||||||
|
val annualLeave = withContext(Dispatchers.IO) { repo.getAnnualLeave() }
|
||||||
|
annualLeave?.let {
|
||||||
|
binding.tvAnnualLeave.text = "연차: ${formatRemainingDays(it.remainingDays)}"
|
||||||
|
} ?: run {
|
||||||
|
binding.tvAnnualLeave.text = "연차: --"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update Shift Summary Chips (v2.2.0)
|
||||||
|
val juCount = days.count { it.date != null && (it.shift == "주간" || it.shift == "주") }
|
||||||
|
val seokCount = days.count { it.date != null && (it.shift == "석간" || it.shift == "석") }
|
||||||
|
val yaCount = days.count { it.date != null && (it.shift == "야간" || it.shift == "야") }
|
||||||
|
val monthlyOvertime = withContext(Dispatchers.IO) { repo.getMonthlyOvertimeHours(targetMonth) }
|
||||||
|
|
||||||
|
binding.chipJu.text = "주간 ${juCount}일"
|
||||||
|
binding.chipSeok.text = "석간 ${seokCount}일"
|
||||||
|
binding.chipYa.text = "야간 ${yaCount}일"
|
||||||
|
binding.chipOvertime.text = "연장 ${monthlyOvertime}h"
|
||||||
|
|
||||||
updateOtherTeamsLayout(today, factory, prefs)
|
updateOtherTeamsLayout(today, factory, prefs)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun updateCalendar() {
|
||||||
|
lifecycleScope.launch {
|
||||||
|
loadCalendarDataForMonth(currentViewMonth)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun updateOtherTeamsLayout(today: LocalDate, factory: String, prefs: android.content.SharedPreferences) {
|
private fun updateOtherTeamsLayout(today: LocalDate, factory: String, prefs: android.content.SharedPreferences) {
|
||||||
val teamColors = mapOf(
|
val teamColors = mapOf(
|
||||||
"A" to R.color.team_a_color,
|
"A" to R.color.team_a_color,
|
||||||
@@ -717,46 +749,71 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun animateMonthTransition(direction: Int) {
|
private fun animateMonthTransition(direction: Int) {
|
||||||
|
if (isAnimatingMonth) return
|
||||||
val card = binding.calendarCard
|
val card = binding.calendarCard
|
||||||
|
val snapshot = binding.calendarOverlaySnapshot
|
||||||
val width = card.width.toFloat()
|
val width = card.width.toFloat()
|
||||||
|
|
||||||
|
val nextMonth = if (direction > 0) {
|
||||||
|
currentViewMonth.plusMonths(1)
|
||||||
|
} else {
|
||||||
|
currentViewMonth.minusMonths(1)
|
||||||
|
}
|
||||||
|
|
||||||
if (width == 0f) {
|
if (width == 0f) {
|
||||||
currentViewMonth = if (direction > 0) {
|
currentViewMonth = nextMonth
|
||||||
currentViewMonth.plusMonths(1)
|
|
||||||
} else {
|
|
||||||
currentViewMonth.minusMonths(1)
|
|
||||||
}
|
|
||||||
updateCalendar()
|
updateCalendar()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
val fluidInterpolator = androidx.core.view.animation.PathInterpolatorCompat.create(0.22f, 1.0f, 0.36f, 1.0f)
|
isAnimatingMonth = true
|
||||||
|
|
||||||
card.animate()
|
// 1. Capture bitmap snapshot of current calendar card
|
||||||
.translationX(if (direction > 0) -width else width)
|
try {
|
||||||
.alpha(0.8f)
|
val bitmap = Bitmap.createBitmap(card.width, card.height, Bitmap.Config.ARGB_8888)
|
||||||
.setDuration(160)
|
val canvas = Canvas(bitmap)
|
||||||
.setInterpolator(fluidInterpolator)
|
card.draw(canvas)
|
||||||
.withEndAction {
|
snapshot.setImageBitmap(bitmap)
|
||||||
currentViewMonth = if (direction > 0) {
|
snapshot.visibility = android.view.View.VISIBLE
|
||||||
currentViewMonth.plusMonths(1)
|
snapshot.alpha = 1.0f
|
||||||
} else {
|
snapshot.scaleX = 1.0f
|
||||||
currentViewMonth.minusMonths(1)
|
snapshot.scaleY = 1.0f
|
||||||
|
snapshot.translationX = 0f
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Log.w("MainActivity", "Failed to capture snapshot for month transition", e)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Position top card offscreen before loading
|
||||||
|
card.translationX = if (direction > 0) width else -width
|
||||||
|
currentViewMonth = nextMonth
|
||||||
|
|
||||||
|
// 3. Load next month's data BEFORE starting slide animation to eliminate any flicker
|
||||||
|
lifecycleScope.launch {
|
||||||
|
loadCalendarDataForMonth(currentViewMonth)
|
||||||
|
|
||||||
|
val fluidInterpolator = androidx.core.view.animation.PathInterpolatorCompat.create(0.22f, 1.0f, 0.36f, 1.0f)
|
||||||
|
val duration = 280L
|
||||||
|
|
||||||
|
card.animate()
|
||||||
|
.translationX(0f)
|
||||||
|
.setDuration(duration)
|
||||||
|
.setInterpolator(fluidInterpolator)
|
||||||
|
.withEndAction {
|
||||||
|
snapshot.visibility = android.view.View.GONE
|
||||||
|
snapshot.setImageDrawable(null)
|
||||||
|
isAnimatingMonth = false
|
||||||
}
|
}
|
||||||
updateCalendar()
|
.start()
|
||||||
|
|
||||||
// Incoming slide animation from opposite side
|
snapshot.animate()
|
||||||
card.translationX = if (direction > 0) width else -width
|
.scaleX(0.94f)
|
||||||
card.alpha = 0.8f
|
.scaleY(0.94f)
|
||||||
|
.alpha(0.35f)
|
||||||
card.animate()
|
.translationX(if (direction > 0) -width * 0.22f else width * 0.22f)
|
||||||
.translationX(0f)
|
.setDuration(duration)
|
||||||
.alpha(1f)
|
.setInterpolator(fluidInterpolator)
|
||||||
.setDuration(220)
|
.start()
|
||||||
.setInterpolator(fluidInterpolator)
|
}
|
||||||
.start()
|
|
||||||
}
|
|
||||||
.start()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun formatRemainingDays(days: Float): String {
|
private fun formatRemainingDays(days: Float): String {
|
||||||
|
|||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="oval">
|
||||||
|
<gradient
|
||||||
|
android:type="radial"
|
||||||
|
android:gradientRadius="70dp"
|
||||||
|
android:startColor="#FF3B30"
|
||||||
|
android:endColor="#D70015" />
|
||||||
|
<stroke
|
||||||
|
android:width="2dp"
|
||||||
|
android:color="#80FFFFFF" />
|
||||||
|
</shape>
|
||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="oval">
|
||||||
|
<gradient
|
||||||
|
android:type="radial"
|
||||||
|
android:gradientRadius="120dp"
|
||||||
|
android:startColor="#40FF3B30"
|
||||||
|
android:endColor="#00FF3B30" />
|
||||||
|
</shape>
|
||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<corners android:radius="28dp" />
|
||||||
|
<solid android:color="#26FFFFFF" />
|
||||||
|
<stroke
|
||||||
|
android:width="1dp"
|
||||||
|
android:color="#4DFFFFFF" />
|
||||||
|
</shape>
|
||||||
Executable
+9
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M16.67,4H15V2H9v2H7.33C6.6,4 6,4.6 6,5.33v15.33C6,21.4 6.6,22 7.33,22h9.33c0.74,0 1.34,-0.6 1.34,-1.33V5.33C18,4.6 17.4,4 16.67,4zM11,20v-5.5H9L13,7v5.5h2L11,20z"/>
|
||||||
|
</vector>
|
||||||
Executable
+9
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M12,7V3H2v18h20V7H12zM6,19H4v-2h2v2zm0,-4H4v-2h2v2zm0,-4H4V9h2v2zm0,-4H4V5h2v2zm4,12H8v-2h2v2zm0,-4H8v-2h2v2zm0,-4H8V9h2v2zm0,-4H8V5h2v2zm10,12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2,-8h-2v2h2V11zm0,4h-2v2h2v-2z"/>
|
||||||
|
</vector>
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M7,14H5v5h5v-2H7v-3zm-2,-4h2V7h3V5H5v5zm12,7h-3v2h5v-5h-2v3zM14,5v2h3v3h2V5h-5z"/>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M12,8.5c-1.93,0 -3.5,1.57 -3.5,3.5s1.57,3.5 3.5,3.5 3.5,-1.57 3.5,-3.5 -1.57,-3.5 -3.5,-3.5zm0,5.5c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2z"/>
|
||||||
|
</vector>
|
||||||
Executable
+9
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M11.99,18.54l-7.37,-5.73L3,14.07l9,7 9,-7 -1.63,-1.27 -7.38,5.74zM12,16l7.36,-5.73L21,9.07l-9,-7 -9,7 1.63,1.2L12,16z"/>
|
||||||
|
</vector>
|
||||||
Executable
+9
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M12,3c-4.97,0 -9,4.03 -9,9 0,2.12 0.74,4.07 1.97,5.61L4.35,18.4c-0.39,0.39 -0.39,1.02 0,1.41 0.39,0.39 1.02,0.39 1.41,0l0.79,-0.79C8.07,20.26 10.02,21 12,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zm-5.5,9c-0.83,0 -1.5,-0.67 -1.5,-1.5S5.67,9 6.5,9 8,9.67 8,10.5 7.33,12 6.5,12zm3,-4C8.67,8 8,7.33 8,6.5S8.67,5 9.5,5s1.5,0.67 1.5,1.5S10.33,8 9.5,8zm5,0c-0.83,0 -1.5,-0.67 -1.5,-1.5S13.67,5 14.5,5s1.5,0.67 1.5,1.5S15.33,8 14.5,8zm3,4c-0.83,0 -1.5,-0.67 -1.5,-1.5S16.67,9 17.5,9s1.5,0.67 1.5,1.5 -0.67,1.5 -1.5,1.5z"/>
|
||||||
|
</vector>
|
||||||
Executable
+9
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92s2.92,-1.31 2.92,-2.92c0,-1.61 -1.31,-2.92 -2.92,-2.92z"/>
|
||||||
|
</vector>
|
||||||
Executable
+9
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M12,2c-5.33,4.55 -8,8.48 -8,11.8c0,4.98 3.8,8.2 8,8.2s8,-3.22 8,-8.2c0,-3.32 -2.67,-7.25 -8,-11.8zM12,20c-3.31,0 -6,-2.63 -6,-6.2c0,-2.36 1.83,-5.3 6,-9.05c4.17,3.75 6,6.69 6,9.05c0,3.57 -2.69,6.2 -6,6.2z"/>
|
||||||
|
</vector>
|
||||||
@@ -1,110 +1,164 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/alarmRoot"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/bg_mesh_gradient"
|
android:background="@drawable/bg_alarm_gradient"
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
android:clipToPadding="false">
|
android:clipToPadding="false">
|
||||||
|
|
||||||
<!-- Header / Info Section -->
|
<!-- Top Shift / Alarm Label Pill Badge -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/headerContainer"
|
android:id="@+id/shiftBadgeContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="horizontal"
|
||||||
android:layout_marginTop="40dp"
|
android:gravity="center"
|
||||||
android:paddingHorizontal="32dp"
|
android:background="@drawable/bg_snooze_hub_samsung"
|
||||||
android:paddingVertical="16dp">
|
android:paddingHorizontal="16dp"
|
||||||
|
android:paddingVertical="6dp"
|
||||||
|
android:layout_marginTop="64dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
|
|
||||||
<TextView
|
<ImageView
|
||||||
android:id="@+id/tvCurrentTime"
|
android:layout_width="16dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="16dp"
|
||||||
android:layout_height="wrap_content"
|
android:src="@drawable/ic_alarm"
|
||||||
android:text="오후 2:59"
|
app:tint="#FFFFFF"
|
||||||
android:textSize="88sp"
|
android:layout_marginEnd="6dp"/>
|
||||||
android:fontFamily="sans-serif-thin"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:letterSpacing="0.02"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvDate"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="2월 14일 토요일"
|
|
||||||
android:textSize="26sp"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:alpha="0.5"
|
|
||||||
android:layout_marginTop="16dp"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvShiftType"
|
android:id="@+id/tvShiftType"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="[주간] 근무 알람"
|
android:text="[주간] 07:00 근무 알람"
|
||||||
android:textSize="16sp"
|
android:textSize="14sp"
|
||||||
android:textColor="@color/white"
|
android:textStyle="bold"
|
||||||
android:alpha="0.4"
|
android:textColor="#FFFFFF" />
|
||||||
android:layout_marginTop="8dp"/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- Center Control Area -->
|
<!-- Large Time Display (Samsung One UI Clock Typography) -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvCurrentTime"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="07:00"
|
||||||
|
android:textSize="80sp"
|
||||||
|
android:fontFamily="sans-serif-light"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:letterSpacing="0.01"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/shiftBadgeContainer"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
|
<!-- Date & Day Display -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvDate"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="2월 14일 토요일"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textColor="#CCFFFFFF"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvCurrentTime"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
|
<!-- Middle: Snooze Hub / Capsule Button (Samsung One UI 8.5/9.0 Style) -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/btnSnooze"
|
||||||
android:layout_height="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:orientation="vertical"
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:layout_below="@id/headerContainer"
|
android:background="@drawable/bg_snooze_hub_samsung"
|
||||||
android:paddingBottom="80dp"
|
android:paddingHorizontal="36dp"
|
||||||
android:clipChildren="false"
|
android:paddingVertical="16dp"
|
||||||
android:clipToPadding="false">
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:layout_marginBottom="40dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/dismissContainer"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:src="@drawable/ic_bell"
|
||||||
|
app:tint="#FFFFFF"
|
||||||
|
android:layout_marginEnd="10dp"/>
|
||||||
|
|
||||||
<!-- Snooze Button (Glass style) -->
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/btnSnooze"
|
android:id="@+id/tvSnoozeText"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingHorizontal="48dp"
|
android:text="다시 울림 (5분)"
|
||||||
android:paddingVertical="18dp"
|
android:textSize="18sp"
|
||||||
android:text="다시 울림"
|
android:textStyle="bold"
|
||||||
android:textSize="22sp"
|
android:textColor="#FFFFFF" />
|
||||||
android:textColor="@color/white"
|
|
||||||
android:alpha="0.9"
|
|
||||||
android:background="@drawable/bg_glass_pill_v4"
|
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"/>
|
|
||||||
|
|
||||||
<!-- Stop Button Container with Pulse -->
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="320dp"
|
|
||||||
android:layout_height="320dp"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:clipChildren="false"
|
|
||||||
android:clipToPadding="false">
|
|
||||||
|
|
||||||
<!-- Glowing Pulse View -->
|
|
||||||
<View
|
|
||||||
android:id="@+id/pulseCircle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:background="@drawable/bg_pulse_gradient"/>
|
|
||||||
|
|
||||||
<!-- Dismiss Button -->
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/btnDismiss"
|
|
||||||
android:layout_width="200dp"
|
|
||||||
android:layout_height="200dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="해제"
|
|
||||||
android:textSize="34sp"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:background="@drawable/bg_dismiss_circle_v4"
|
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"/>
|
|
||||||
</FrameLayout>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Bottom: Dismiss (해제) Control with Expanding Breathing Wave -->
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/dismissContainer"
|
||||||
|
android:layout_width="260dp"
|
||||||
|
android:layout_height="260dp"
|
||||||
|
android:layout_marginBottom="54dp"
|
||||||
|
android:clipChildren="false"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
|
|
||||||
</RelativeLayout>
|
<!-- Outer Glowing Pulse Wave -->
|
||||||
|
<View
|
||||||
|
android:id="@+id/pulseCircle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:background="@drawable/bg_pulse_wave_samsung" />
|
||||||
|
|
||||||
|
<!-- Inner Ambient Ring -->
|
||||||
|
<View
|
||||||
|
android:id="@+id/ambientRing"
|
||||||
|
android:layout_width="160dp"
|
||||||
|
android:layout_height="160dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:background="@drawable/bg_pulse_wave_samsung" />
|
||||||
|
|
||||||
|
<!-- Samsung Style Dismiss Button (Tap or Swipe to dismiss) -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/btnDismiss"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="100dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:gravity="center"
|
||||||
|
android:background="@drawable/bg_dismiss_samsung"
|
||||||
|
android:elevation="8dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="28dp"
|
||||||
|
android:layout_height="28dp"
|
||||||
|
android:src="@drawable/ic_delete"
|
||||||
|
app:tint="#FFFFFF" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="해제"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:layout_marginTop="2dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
@@ -58,26 +58,39 @@
|
|||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<!-- Maximized Calendar Card -->
|
<!-- Maximized Calendar Card with Layered Stack Wrapper -->
|
||||||
<androidx.cardview.widget.CardView
|
<FrameLayout
|
||||||
android:id="@+id/calendarCard"
|
android:id="@+id/calendarWrapper"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_marginHorizontal="3dp"
|
android:layout_marginHorizontal="3dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
app:cardCornerRadius="28dp"
|
|
||||||
app:cardElevation="0dp"
|
|
||||||
app:cardBackgroundColor="@android:color/transparent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/headerRoot"
|
app:layout_constraintTop_toBottomOf="@id/headerRoot"
|
||||||
app:layout_constraintBottom_toTopOf="@id/otherTeamsCard"
|
app:layout_constraintBottom_toTopOf="@id/otherTeamsCard"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent">
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<!-- Bottom Snapshot View (Underneath Card Stack) -->
|
||||||
android:id="@+id/calendarContainer"
|
<ImageView
|
||||||
|
android:id="@+id/calendarOverlaySnapshot"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/bg_glass_panel_v3">
|
android:scaleType="fitXY"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:id="@+id/calendarCard"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:cardCornerRadius="28dp"
|
||||||
|
app:cardElevation="0dp"
|
||||||
|
app:cardBackgroundColor="@android:color/transparent">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/calendarContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/bg_glass_panel_v3">
|
||||||
|
|
||||||
<!-- Compact Month Controls -->
|
<!-- Compact Month Controls -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -301,6 +314,7 @@
|
|||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
<!-- Other Teams Compact Section -->
|
<!-- Other Teams Compact Section -->
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
|
|||||||
@@ -49,8 +49,8 @@
|
|||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@drawable/ic_plus_circle"
|
android:src="@drawable/ic_tide"
|
||||||
app:tint="@color/primary"/>
|
app:tint="#0EA5E9"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -120,8 +120,8 @@
|
|||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@drawable/ic_settings"
|
android:src="@drawable/ic_palette"
|
||||||
app:tint="@color/primary"/>
|
app:tint="#AF52DE"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -260,7 +260,7 @@
|
|||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@drawable/ic_memo"
|
android:src="@drawable/ic_memo"
|
||||||
app:tint="@color/primary"/>
|
app:tint="#0284C7"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -309,7 +309,7 @@
|
|||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@drawable/ic_bell"
|
android:src="@drawable/ic_bell"
|
||||||
app:tint="@color/primary"/>
|
app:tint="#FF9500"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -357,8 +357,8 @@
|
|||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@drawable/ic_plus_circle"
|
android:src="@drawable/ic_share"
|
||||||
app:tint="@color/primary"/>
|
app:tint="#34C759"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|||||||
@@ -55,8 +55,8 @@
|
|||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@drawable/ic_settings"
|
android:src="@drawable/ic_factory"
|
||||||
app:tint="@color/primary"/>
|
app:tint="#007AFF"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -102,8 +102,8 @@
|
|||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@drawable/ic_check"
|
android:src="@drawable/ic_user"
|
||||||
app:tint="@color/primary"/>
|
app:tint="#34C759"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -175,8 +175,8 @@
|
|||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@drawable/ic_alarm"
|
android:src="@drawable/ic_battery"
|
||||||
app:tint="@color/shift_red"/>
|
app:tint="#34C759"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -232,7 +232,7 @@
|
|||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@drawable/ic_alarm"
|
android:src="@drawable/ic_alarm"
|
||||||
app:tint="@color/primary"/>
|
app:tint="#007AFF"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -288,8 +288,8 @@
|
|||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@drawable/ic_plus_circle"
|
android:src="@drawable/ic_layers"
|
||||||
app:tint="@color/primary"/>
|
app:tint="#00C7BE"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -344,8 +344,8 @@
|
|||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@drawable/ic_bell"
|
android:src="@drawable/ic_fullscreen_intent"
|
||||||
app:tint="@color/primary"/>
|
app:tint="#AF52DE"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -401,7 +401,7 @@
|
|||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@drawable/ic_settings"
|
android:src="@drawable/ic_settings"
|
||||||
app:tint="@color/text_tertiary"/>
|
app:tint="#FF9500"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|||||||
@@ -7,19 +7,41 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/bg_grid_cell_v4">
|
android:background="@drawable/bg_grid_cell_v4">
|
||||||
|
|
||||||
<!-- Day Number (top-left) -->
|
<!-- Top Row: Day Number & Small Shift Badge (shown when memo exists) -->
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/dayNumber"
|
android:id="@+id/topBar"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="2dp"
|
||||||
android:text="12"
|
|
||||||
android:textColor="@color/text_primary"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/dayNumber"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="12"
|
||||||
|
android:textColor="@color/text_primary"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<!-- Small Shift Badge next to Day Number (shown when day has memo) -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvShiftSmall"
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:layout_marginStart="3dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:text="주"
|
||||||
|
android:textSize="9.5sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/text_primary"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- Tide Text (top-right) -->
|
<!-- Tide Text (top-right) -->
|
||||||
<TextView
|
<TextView
|
||||||
@@ -27,7 +49,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="4dp"
|
android:layout_marginEnd="4dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="2dp"
|
||||||
android:text="08:20"
|
android:text="08:20"
|
||||||
android:textColor="@color/text_tertiary"
|
android:textColor="@color/text_tertiary"
|
||||||
android:textSize="9sp"
|
android:textSize="9sp"
|
||||||
@@ -35,15 +57,14 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<!-- Shift Abbreviation Circular Indicator (Center) -->
|
<!-- Standard Shift Abbreviation Circular Indicator (Center - shown when NO memo) -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/shiftChar"
|
android:id="@+id/shiftChar"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="주"
|
android:text="주"
|
||||||
android:textSize="15sp"
|
android:textSize="20sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="@color/text_primary"
|
android:textColor="@color/text_primary"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
@@ -52,25 +73,27 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintVertical_bias="0.45"/>
|
app:layout_constraintVertical_bias="0.45"/>
|
||||||
|
|
||||||
<!-- Memo Content Text (Below Shift) - Max 3 lines -->
|
<!-- Memo Content Text (Center/Body) - Up to 4 lines when memo exists -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/memoContent"
|
android:id="@+id/memoContent"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="메모내용"
|
android:text="메모내용\n2줄\n3줄\n4줄"
|
||||||
android:textSize="9.5sp"
|
android:textSize="9.5sp"
|
||||||
android:textColor="@color/secondary"
|
android:textStyle="bold"
|
||||||
android:maxLines="3"
|
android:textColor="@color/text_primary"
|
||||||
|
android:lineSpacingMultiplier="1.05"
|
||||||
|
android:maxLines="4"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
android:layout_marginHorizontal="2dp"
|
||||||
android:layout_marginTop="1dp"
|
android:layout_marginTop="1dp"
|
||||||
android:layout_marginBottom="1dp"
|
android:layout_marginBottom="1dp"
|
||||||
android:paddingHorizontal="2dp"
|
app:layout_constraintTop_toBottomOf="@id/topBar"
|
||||||
app:layout_constraintTop_toBottomOf="@id/shiftChar"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"/>
|
||||||
app:layout_constraintBottom_toTopOf="@id/memoIndicator"/>
|
|
||||||
|
|
||||||
<!-- Holiday Name Small (Bottom) -->
|
<!-- Holiday Name Small (Bottom) -->
|
||||||
<TextView
|
<TextView
|
||||||
@@ -80,23 +103,10 @@
|
|||||||
android:text="설날"
|
android:text="설날"
|
||||||
android:textSize="9sp"
|
android:textSize="9sp"
|
||||||
android:textColor="@color/shift_red"
|
android:textColor="@color/shift_red"
|
||||||
android:layout_marginBottom="2dp"
|
android:layout_marginBottom="1dp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toTopOf="@id/memoIndicator"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
<!-- Memo Indicator (bottom-right) -->
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/memoIndicator"
|
|
||||||
android:layout_width="12dp"
|
|
||||||
android:layout_height="12dp"
|
|
||||||
android:layout_marginEnd="4dp"
|
|
||||||
android:layout_marginBottom="4dp"
|
|
||||||
android:src="@drawable/ic_memo"
|
|
||||||
app:tint="@color/secondary"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
+33
-15
@@ -6,18 +6,25 @@ import shutil
|
|||||||
|
|
||||||
token = "e3b515eaa0a6683c921ca3bf718e281ed30a6075"
|
token = "e3b515eaa0a6683c921ca3bf718e281ed30a6075"
|
||||||
owner_repo = "sanjeok77/ShiftRing"
|
owner_repo = "sanjeok77/ShiftRing"
|
||||||
tag = "v1.0.2"
|
tag = "v1.0.6"
|
||||||
title = "v1.0.2 - Play Protect 유해앱 차단 오진 원인 완벽 제거 및 전체화면 알림 설정 후 원활한 복귀 지원"
|
title = "v1.0.6 - 달력 월간 이동 깜빡임 완전 제거, 하루 메모 고가독성 색상 적용, 부가기능 및 기본 설정(근무 관리) 아이콘/색상 개편"
|
||||||
body = """## 🚀 ShiftRing v1.0.2 릴리즈
|
body = """## 🚀 ShiftRing v1.0.6 릴리즈
|
||||||
|
|
||||||
### 🌟 주요 변경 및 보안/권한 개선 사항
|
### 🌟 주요 변경 및 개선 사항
|
||||||
1. **Google Play Protect '유해한 앱 차단됨' 경고 원인 완벽 제거**:
|
1. **달력 월간 이동 시 깜빡임(Flicker) 완전 제거 (`MainActivity.kt`)**:
|
||||||
- 구글 플레이 프로텍트 정적 분석에서 트로이목마/취약점 오진을 유발하는 쉘 명령어/루팅 감지 루틴(`RootUtil`, `Runtime.exec`) 완전 제거
|
- 이동 대상 월의 데이터 로딩 및 어댑터 갱신을 슬라이드 애니메이션 시작 전 완벽히 완료하여, 전환 도중의 화면 깜빡임과 데이터 리로드 잔상을 100% 제거
|
||||||
- 불필요한 고위험 권한(`SYSTEM_ALERT_WINDOW`, `DISABLE_KEYGUARD`) 정리로 안전한 정식 앱 프로필 확보
|
2. **하루 메모 가독성 극대화 (`item_day.xml`)**:
|
||||||
2. **전체화면 알림 권한 설정 후 원활한 앱 복귀 처리**:
|
- 기존 연한 녹색 대신 고대비 볼드 텍스트(`@color/text_primary`, `textStyle="bold"`)를 적용하여 어떤 테마에서도 메모 내용이 선명하게 읽히도록 개선
|
||||||
- 시스템 설정 인텐트 호출 시 태스크 스택 플래그를 정돈하여 설정 완료 후 뒤로가기 시 자연스럽게 ShiftRing으로 즉시 복귀되도록 개선
|
3. **부가기능 탭 아이콘 및 고유 색상 전면 개편 (`fragment_settings_additional.xml`)**:
|
||||||
- 불필요한 오버레이 권한 종속성을 제거하고 최신 안드로이드 14/15 표준 `USE_FULL_SCREEN_INTENT` 체계로 일원화
|
- 물때 정보 표시: 물결 아이콘 (`ic_tide`, 스카이블루 `#0EA5E9`)
|
||||||
3. **Android 14/15 호환 및 정식 서명키(release.jks) 적용**"""
|
- 화면 테마 설정: 팔레트 아이콘 (`ic_palette`, 퍼플 `#AF52DE`)
|
||||||
|
- 사용 설명서: 메모 아이콘 (`ic_memo`, 블루 `#0284C7`)
|
||||||
|
- 업데이트 정보: 벨 아이콘 (`ic_bell`, 오렌지 `#FF9500`)
|
||||||
|
- 앱 공유하기: 공유 아이콘 (`ic_share`, 그린 `#34C759`)
|
||||||
|
4. **기본 설정 / 근무 관리 항목 아이콘 및 색상 개편 (`fragment_settings_basic.xml`)**:
|
||||||
|
- 근무 회사: 빌딩/팩토리 아이콘 (`ic_factory`, 블루 `#007AFF`)
|
||||||
|
- 나의 근무 반: 사용자 아이콘 (`ic_user`, 그린 `#34C759`)
|
||||||
|
- 다른 앱 위에 표시: 레이어 아이콘 (`ic_layers`, 시안 `#00C7BE`)"""
|
||||||
|
|
||||||
apk_path = "app/build/outputs/apk/release/app-release.apk"
|
apk_path = "app/build/outputs/apk/release/app-release.apk"
|
||||||
if not os.path.exists(apk_path):
|
if not os.path.exists(apk_path):
|
||||||
@@ -30,7 +37,7 @@ print(f"Using APK at: {apk_path}")
|
|||||||
url = f"https://git.webpluss.net/api/v1/repos/{owner_repo}/releases"
|
url = f"https://git.webpluss.net/api/v1/repos/{owner_repo}/releases"
|
||||||
headers = {"Authorization": f"token {token}", "Content-Type": "application/json"}
|
headers = {"Authorization": f"token {token}", "Content-Type": "application/json"}
|
||||||
|
|
||||||
data = json.dumps({"tag_name": tag, "name": title, "body": body, "draft": False, "prerelease": False}).encode()
|
data = json.dumps({"tag_name": tag, "name": title, "body": body, "draft": False, "prerelease": False}).encode('utf-8')
|
||||||
req = urllib.request.Request(url, data=data, headers=headers, method="POST")
|
req = urllib.request.Request(url, data=data, headers=headers, method="POST")
|
||||||
with urllib.request.urlopen(req) as response:
|
with urllib.request.urlopen(req) as response:
|
||||||
result = json.loads(response.read())
|
result = json.loads(response.read())
|
||||||
@@ -55,14 +62,25 @@ print("Updated app.apk at project root.")
|
|||||||
|
|
||||||
# Update version.json
|
# Update version.json
|
||||||
v_info = {
|
v_info = {
|
||||||
"versionCode": 102,
|
"versionCode": 106,
|
||||||
"versionName": "1.0.2",
|
"versionName": "1.0.6",
|
||||||
"apkUrl": direct_url,
|
"apkUrl": direct_url,
|
||||||
"changelog": "v1.0.2: Play Protect 유해앱 차단 오진 원인 완벽 제거, 전체화면 알림 설정 후 앱 복귀 개선",
|
"changelog": "v1.0.6: 월간 이동 깜빡임 완전 제거, 메모 고가독성 텍스트, 부가기능 및 근무 관리 아이콘/색상 개편",
|
||||||
"forceUpdate": False
|
"forceUpdate": False
|
||||||
}
|
}
|
||||||
with open("version.json", "w", encoding="utf-8") as f:
|
with open("version.json", "w", encoding="utf-8") as f:
|
||||||
json.dump(v_info, f, ensure_ascii=False, indent=2)
|
json.dump(v_info, f, ensure_ascii=False, indent=2)
|
||||||
|
|
||||||
print(f"Updated version.json with apkUrl: {direct_url}")
|
print(f"Updated version.json with apkUrl: {direct_url}")
|
||||||
|
|
||||||
|
# Git commit and push cleanly in UTF-8
|
||||||
|
git_path = r"C:\Users\work\AppData\Roaming\MobaXterm\slash\mx86_64b\bin"
|
||||||
|
os.environ["PATH"] = git_path + os.pathsep + os.environ.get("PATH", "")
|
||||||
|
|
||||||
|
commit_msg = "v1.0.6 - 달력 월간 이동 깜빡임 완전 제거, 하루 메모 고가독성 색상 적용, 부가기능 및 근무 관리 아이콘/색상 개편"
|
||||||
|
subprocess.run(["git", "add", "."], check=True)
|
||||||
|
subprocess.run(["git", "commit", "-m", commit_msg], check=True)
|
||||||
|
subprocess.run(["git", "push", "origin", "main"], check=True)
|
||||||
|
|
||||||
|
print("Git commit and push completed successfully!")
|
||||||
print(f"Release {tag} process finished!")
|
print(f"Release {tag} process finished!")
|
||||||
|
|||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"versionCode": 102,
|
"versionCode": 106,
|
||||||
"versionName": "1.0.2",
|
"versionName": "1.0.6",
|
||||||
"apkUrl": "https://git.webpluss.net/attachments/16044f88-ebaf-4623-9e5f-af9cc98f4e36",
|
"apkUrl": "https://git.webpluss.net/attachments/39cd66d9-61cd-442a-8f47-95b967b41bc4",
|
||||||
"changelog": "v1.0.2: Play Protect 유해앱 차단 오진 원인 완벽 제거, 전체화면 알림 설정 후 앱 복귀 개선",
|
"changelog": "v1.0.6: 월간 이동 깜빡임 완전 제거, 메모 고가독성 텍스트, 부가기능 및 근무 관리 아이콘/색상 개편",
|
||||||
"forceUpdate": false
|
"forceUpdate": false
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user