Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
975413a2d6 |
@@ -20,8 +20,8 @@ android {
|
|||||||
applicationId = "com.example.shiftalarm"
|
applicationId = "com.example.shiftalarm"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 105
|
versionCode = 106
|
||||||
versionName = "1.0.5"
|
versionName = "1.0.6"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -270,118 +270,121 @@ class MainActivity : AppCompatActivity() {
|
|||||||
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
|
||||||
|
val monthStr = targetMonth.toString()
|
||||||
|
val overrides = withContext(Dispatchers.IO) {
|
||||||
|
dao.getOverridesForMonth(factory, currentViewTeam, monthStr).associateBy { overrideItem -> overrideItem.date }
|
||||||
|
}
|
||||||
|
val memos = withContext(Dispatchers.IO) {
|
||||||
|
dao.getMemosForMonth(monthStr).associateBy { memoItem -> memoItem.date }
|
||||||
|
}
|
||||||
|
|
||||||
|
val days = generateDaysForMonthWithData(targetMonth, currentViewTeam, factory, overrides, memos)
|
||||||
|
|
||||||
|
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) {
|
||||||
|
showDaySettingsDialog(date, currentShift)
|
||||||
|
}
|
||||||
|
}, binding.cbShowHolidays.isChecked)
|
||||||
|
if (calcRowHeight > 0) {
|
||||||
|
newAdapter.rowHeight = calcRowHeight
|
||||||
}
|
}
|
||||||
|
calendarAdapter = newAdapter
|
||||||
// Load overrides and memos for the month
|
binding.calendarGrid.adapter = newAdapter
|
||||||
val monthStr = currentViewMonth.toString()
|
} else {
|
||||||
val overrides = withContext(Dispatchers.IO) {
|
calendarAdapter?.let { ad ->
|
||||||
dao.getOverridesForMonth(factory, currentViewTeam, monthStr).associateBy { overrideItem -> overrideItem.date }
|
ad.days = days
|
||||||
}
|
ad.showHolidays = binding.cbShowHolidays.isChecked
|
||||||
val memos = withContext(Dispatchers.IO) {
|
|
||||||
dao.getMemosForMonth(monthStr).associateBy { memoItem -> memoItem.date }
|
|
||||||
}
|
|
||||||
|
|
||||||
val days = generateDaysForMonthWithData(currentViewMonth, currentViewTeam, factory, overrides, memos)
|
|
||||||
|
|
||||||
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) {
|
|
||||||
showDaySettingsDialog(date, currentShift)
|
|
||||||
}
|
|
||||||
}, binding.cbShowHolidays.isChecked)
|
|
||||||
if (calcRowHeight > 0) {
|
if (calcRowHeight > 0) {
|
||||||
newAdapter.rowHeight = calcRowHeight
|
ad.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()
|
|
||||||
}
|
}
|
||||||
|
ad.notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
binding.monthTitle.text = currentViewMonth.format(DateTimeFormatter.ofPattern("yyyy년 MM월"))
|
binding.monthTitle.text = targetMonth.format(DateTimeFormatter.ofPattern("yyyy년 MM월"))
|
||||||
|
|
||||||
if (calcRowHeight == 0) {
|
if (calcRowHeight == 0) {
|
||||||
binding.calendarGrid.post {
|
binding.calendarGrid.post {
|
||||||
val h = binding.calendarGrid.height
|
val h = binding.calendarGrid.height
|
||||||
if (h > 0) {
|
if (h > 0) {
|
||||||
val rH = h / 5
|
val rH = h / 5
|
||||||
calendarAdapter?.let {
|
calendarAdapter?.let {
|
||||||
if (it.rowHeight != rH) {
|
if (it.rowHeight != rH) {
|
||||||
it.rowHeight = rH
|
it.rowHeight = rH
|
||||||
it.notifyDataSetChanged()
|
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,
|
||||||
@@ -751,12 +754,14 @@ class MainActivity : AppCompatActivity() {
|
|||||||
val snapshot = binding.calendarOverlaySnapshot
|
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
|
||||||
}
|
}
|
||||||
@@ -778,44 +783,37 @@ class MainActivity : AppCompatActivity() {
|
|||||||
Log.w("MainActivity", "Failed to capture snapshot for month transition", e)
|
Log.w("MainActivity", "Failed to capture snapshot for month transition", e)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. Update to new month immediately
|
// 2. Position top card offscreen before loading
|
||||||
currentViewMonth = if (direction > 0) {
|
|
||||||
currentViewMonth.plusMonths(1)
|
|
||||||
} else {
|
|
||||||
currentViewMonth.minusMonths(1)
|
|
||||||
}
|
|
||||||
updateCalendar()
|
|
||||||
|
|
||||||
// 3. Prepare incoming new month card on top
|
|
||||||
card.translationX = if (direction > 0) width else -width
|
card.translationX = if (direction > 0) width else -width
|
||||||
card.alpha = 1.0f
|
currentViewMonth = nextMonth
|
||||||
card.cardElevation = dpToPx(8f).toFloat()
|
|
||||||
|
|
||||||
val fluidInterpolator = androidx.core.view.animation.PathInterpolatorCompat.create(0.22f, 1.0f, 0.36f, 1.0f)
|
// 3. Load next month's data BEFORE starting slide animation to eliminate any flicker
|
||||||
val duration = 280L
|
lifecycleScope.launch {
|
||||||
|
loadCalendarDataForMonth(currentViewMonth)
|
||||||
|
|
||||||
// 4. Slide top new month card smoothly into position
|
val fluidInterpolator = androidx.core.view.animation.PathInterpolatorCompat.create(0.22f, 1.0f, 0.36f, 1.0f)
|
||||||
card.animate()
|
val duration = 280L
|
||||||
.translationX(0f)
|
|
||||||
.setDuration(duration)
|
|
||||||
.setInterpolator(fluidInterpolator)
|
|
||||||
.withEndAction {
|
|
||||||
card.cardElevation = 0f
|
|
||||||
snapshot.visibility = android.view.View.GONE
|
|
||||||
snapshot.setImageDrawable(null)
|
|
||||||
isAnimatingMonth = false
|
|
||||||
}
|
|
||||||
.start()
|
|
||||||
|
|
||||||
// 5. Parallax fade & scale down bottom snapshot card
|
card.animate()
|
||||||
snapshot.animate()
|
.translationX(0f)
|
||||||
.scaleX(0.94f)
|
.setDuration(duration)
|
||||||
.scaleY(0.94f)
|
.setInterpolator(fluidInterpolator)
|
||||||
.alpha(0.35f)
|
.withEndAction {
|
||||||
.translationX(if (direction > 0) -width * 0.22f else width * 0.22f)
|
snapshot.visibility = android.view.View.GONE
|
||||||
.setDuration(duration)
|
snapshot.setImageDrawable(null)
|
||||||
.setInterpolator(fluidInterpolator)
|
isAnimatingMonth = false
|
||||||
.start()
|
}
|
||||||
|
.start()
|
||||||
|
|
||||||
|
snapshot.animate()
|
||||||
|
.scaleX(0.94f)
|
||||||
|
.scaleY(0.94f)
|
||||||
|
.alpha(0.35f)
|
||||||
|
.translationX(if (direction > 0) -width * 0.22f else width * 0.22f)
|
||||||
|
.setDuration(duration)
|
||||||
|
.setInterpolator(fluidInterpolator)
|
||||||
|
.start()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun formatRemainingDays(days: Float): String {
|
private fun formatRemainingDays(days: Float): String {
|
||||||
|
|||||||
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>
|
||||||
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>
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -81,7 +81,8 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="메모내용\n2줄\n3줄\n4줄"
|
android:text="메모내용\n2줄\n3줄\n4줄"
|
||||||
android:textSize="9.5sp"
|
android:textSize="9.5sp"
|
||||||
android:textColor="@color/secondary"
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/text_primary"
|
||||||
android:lineSpacingMultiplier="1.05"
|
android:lineSpacingMultiplier="1.05"
|
||||||
android:maxLines="4"
|
android:maxLines="4"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
|
|||||||
+21
-18
@@ -6,22 +6,25 @@ import shutil
|
|||||||
|
|
||||||
token = "e3b515eaa0a6683c921ca3bf718e281ed30a6075"
|
token = "e3b515eaa0a6683c921ca3bf718e281ed30a6075"
|
||||||
owner_repo = "sanjeok77/ShiftRing"
|
owner_repo = "sanjeok77/ShiftRing"
|
||||||
tag = "v1.0.5"
|
tag = "v1.0.6"
|
||||||
title = "v1.0.5 - 메모 아이콘 정리, 삼성 One UI 8.5/9.0 알람 화면 리디자인, 달력 초기 깜빡임 해소 및 카드 스택 레이어 전환 애니메이션 적용"
|
title = "v1.0.6 - 달력 월간 이동 깜빡임 완전 제거, 하루 메모 고가독성 색상 적용, 부가기능 및 기본 설정(근무 관리) 아이콘/색상 개편"
|
||||||
body = """## 🚀 ShiftRing v1.0.5 릴리즈
|
body = """## 🚀 ShiftRing v1.0.6 릴리즈
|
||||||
|
|
||||||
### 🌟 주요 변경 및 개선 사항
|
### 🌟 주요 변경 및 개선 사항
|
||||||
1. **하루 메모 불필요한 하단 아이콘 제거 (`item_day.xml`, `CalendarAdapter.kt`)**:
|
1. **달력 월간 이동 시 깜빡임(Flicker) 완전 제거 (`MainActivity.kt`)**:
|
||||||
- 메모 텍스트가 이미 상단/중앙에 4줄로 표시되므로 중복되던 하단 메모/수정 아이콘을 깔끔하게 제거하여 셀 공간 최적화
|
- 이동 대상 월의 데이터 로딩 및 어댑터 갱신을 슬라이드 애니메이션 시작 전 완벽히 완료하여, 전환 도중의 화면 깜빡임과 데이터 리로드 잔상을 100% 제거
|
||||||
2. **알람 울림/해제 화면 삼성 One UI 8.5/9.0 최신 디자인 전면 개편 (`activity_alarm.xml`, `AlarmActivity.kt`)**:
|
2. **하루 메모 가독성 극대화 (`item_day.xml`)**:
|
||||||
- 상단 근무 라벨 뱃지 + 대형 현대적 시계 타이포그래피 + 날짜 정보 일원화
|
- 기존 연한 녹색 대신 고대비 볼드 텍스트(`@color/text_primary`, `textStyle="bold"`)를 적용하여 어떤 테마에서도 메모 내용이 선명하게 읽히도록 개선
|
||||||
- 중앙 와이드 글래스 캡슐 허브 다시 울림(스누즈) 버튼 탑재
|
3. **부가기능 탭 아이콘 및 고유 색상 전면 개편 (`fragment_settings_additional.xml`)**:
|
||||||
- 하단 듀얼 펄스 웨이브 앰비언트 글로우 및 옴니 다이렉션 스와이프/탭 해제 컨트롤 적용
|
- 물때 정보 표시: 물결 아이콘 (`ic_tide`, 스카이블루 `#0EA5E9`)
|
||||||
3. **앱 초기 실행 시 달력 화면 깜빡임(Flicker) 완벽 해소 (`MainActivity.kt`)**:
|
- 화면 테마 설정: 팔레트 아이콘 (`ic_palette`, 퍼플 `#AF52DE`)
|
||||||
- `RecyclerView` 불필요한 기본 애니메이터 제거 및 어댑터/행 높이 재계산 로직 최적화로 초기 진입 시 잔상 없이 즉각 로딩
|
- 사용 설명서: 메모 아이콘 (`ic_memo`, 블루 `#0284C7`)
|
||||||
4. **달력 월간 이동 시 카드 스택(Card Stack) 레이어 전환 애니메이션 구현 (`MainActivity.kt`, `activity_main.xml`)**:
|
- 업데이트 정보: 벨 아이콘 (`ic_bell`, 오렌지 `#FF9500`)
|
||||||
- 이전 달 화면이 하단에 베이스로 자연스럽게 깔리고(0.94x 축소 및 0.35 알파 페이드), 새 달 카드가 상단에서 부드럽게 감속 슬라이드 오버되는 끊김 없는 유체 모션 적용
|
- 앱 공유하기: 공유 아이콘 (`ic_share`, 그린 `#34C759`)
|
||||||
5. **Android 14/15 호환 및 정식 서명키(release.jks) 적용**"""
|
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):
|
||||||
@@ -59,10 +62,10 @@ print("Updated app.apk at project root.")
|
|||||||
|
|
||||||
# Update version.json
|
# Update version.json
|
||||||
v_info = {
|
v_info = {
|
||||||
"versionCode": 105,
|
"versionCode": 106,
|
||||||
"versionName": "1.0.5",
|
"versionName": "1.0.6",
|
||||||
"apkUrl": direct_url,
|
"apkUrl": direct_url,
|
||||||
"changelog": "v1.0.5: 메모 아이콘 정리, 삼성 최신 알람 화면 개편, 달력 초기 깜빡임 해소, 카드 스택 레이어 전환 애니메이션 적용",
|
"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:
|
||||||
@@ -74,7 +77,7 @@ print(f"Updated version.json with apkUrl: {direct_url}")
|
|||||||
git_path = r"C:\Users\work\AppData\Roaming\MobaXterm\slash\mx86_64b\bin"
|
git_path = r"C:\Users\work\AppData\Roaming\MobaXterm\slash\mx86_64b\bin"
|
||||||
os.environ["PATH"] = git_path + os.pathsep + os.environ.get("PATH", "")
|
os.environ["PATH"] = git_path + os.pathsep + os.environ.get("PATH", "")
|
||||||
|
|
||||||
commit_msg = "v1.0.5 - 메모 아이콘 정리, 삼성 One UI 최신 알람 화면 개편, 달력 깜빡임 해소 및 카드 스택 전환 애니메이션 적용"
|
commit_msg = "v1.0.6 - 달력 월간 이동 깜빡임 완전 제거, 하루 메모 고가독성 색상 적용, 부가기능 및 근무 관리 아이콘/색상 개편"
|
||||||
subprocess.run(["git", "add", "."], check=True)
|
subprocess.run(["git", "add", "."], check=True)
|
||||||
subprocess.run(["git", "commit", "-m", commit_msg], check=True)
|
subprocess.run(["git", "commit", "-m", commit_msg], check=True)
|
||||||
subprocess.run(["git", "push", "origin", "main"], check=True)
|
subprocess.run(["git", "push", "origin", "main"], check=True)
|
||||||
|
|||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"versionCode": 105,
|
"versionCode": 106,
|
||||||
"versionName": "1.0.5",
|
"versionName": "1.0.6",
|
||||||
"apkUrl": "https://git.webpluss.net/attachments/b03485a6-cae4-471d-81c0-4f6288d3aa9f",
|
"apkUrl": "https://git.webpluss.net/attachments/39cd66d9-61cd-442a-8f47-95b967b41bc4",
|
||||||
"changelog": "v1.0.5: 메모 아이콘 정리, 삼성 최신 알람 화면 개편, 달력 초기 깜빡임 해소, 카드 스택 레이어 전환 애니메이션 적용",
|
"changelog": "v1.0.6: 월간 이동 깜빡임 완전 제거, 메모 고가독성 텍스트, 부가기능 및 근무 관리 아이콘/색상 개편",
|
||||||
"forceUpdate": false
|
"forceUpdate": false
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user