v1.0.6 - 달력 월간 이동 깜빡임 완전 제거, 하루 메모 고가독성 색상 적용, 부가기능 및 근무 관리 아이콘/색상 개편
This commit is contained in:
@@ -20,8 +20,8 @@ android {
|
||||
applicationId = "com.example.shiftalarm"
|
||||
minSdk = 26
|
||||
targetSdk = 35
|
||||
versionCode = 105
|
||||
versionName = "1.0.5"
|
||||
versionCode = 106
|
||||
versionName = "1.0.6"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
@@ -270,15 +270,12 @@ class MainActivity : AppCompatActivity() {
|
||||
updateCalendar()
|
||||
}
|
||||
|
||||
private fun updateCalendar() {
|
||||
private suspend fun loadCalendarDataForMonth(targetMonth: YearMonth) {
|
||||
val prefs = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
||||
val selectedTeam = prefs.getString(KEY_TEAM, "A") ?: "A"
|
||||
val factory = prefs.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
||||
|
||||
// Today's Shift
|
||||
val today = LocalDate.now(ShiftCalculator.SEOUL_ZONE)
|
||||
|
||||
lifecycleScope.launch {
|
||||
val db = AppDatabase.getDatabase(this@MainActivity)
|
||||
val dao = db.shiftDao()
|
||||
val repo = ShiftRepository(this@MainActivity)
|
||||
@@ -296,7 +293,7 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
// Load overrides and memos for the month
|
||||
val monthStr = currentViewMonth.toString()
|
||||
val monthStr = targetMonth.toString()
|
||||
val overrides = withContext(Dispatchers.IO) {
|
||||
dao.getOverridesForMonth(factory, currentViewTeam, monthStr).associateBy { overrideItem -> overrideItem.date }
|
||||
}
|
||||
@@ -304,7 +301,7 @@ class MainActivity : AppCompatActivity() {
|
||||
dao.getMemosForMonth(monthStr).associateBy { memoItem -> memoItem.date }
|
||||
}
|
||||
|
||||
val days = generateDaysForMonthWithData(currentViewMonth, currentViewTeam, factory, overrides, memos)
|
||||
val days = generateDaysForMonthWithData(targetMonth, currentViewTeam, factory, overrides, memos)
|
||||
|
||||
val availableHeight = binding.calendarGrid.height
|
||||
val calcRowHeight = if (availableHeight > 0) availableHeight / 5 else 0
|
||||
@@ -331,7 +328,7 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
binding.monthTitle.text = currentViewMonth.format(DateTimeFormatter.ofPattern("yyyy년 MM월"))
|
||||
binding.monthTitle.text = targetMonth.format(DateTimeFormatter.ofPattern("yyyy년 MM월"))
|
||||
|
||||
if (calcRowHeight == 0) {
|
||||
binding.calendarGrid.post {
|
||||
@@ -372,16 +369,22 @@ class MainActivity : AppCompatActivity() {
|
||||
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) }
|
||||
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)
|
||||
}
|
||||
|
||||
private fun updateCalendar() {
|
||||
lifecycleScope.launch {
|
||||
loadCalendarDataForMonth(currentViewMonth)
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateOtherTeamsLayout(today: LocalDate, factory: String, prefs: android.content.SharedPreferences) {
|
||||
val teamColors = mapOf(
|
||||
"A" to R.color.team_a_color,
|
||||
@@ -751,12 +754,14 @@ class MainActivity : AppCompatActivity() {
|
||||
val snapshot = binding.calendarOverlaySnapshot
|
||||
val width = card.width.toFloat()
|
||||
|
||||
if (width == 0f) {
|
||||
currentViewMonth = if (direction > 0) {
|
||||
val nextMonth = if (direction > 0) {
|
||||
currentViewMonth.plusMonths(1)
|
||||
} else {
|
||||
currentViewMonth.minusMonths(1)
|
||||
}
|
||||
|
||||
if (width == 0f) {
|
||||
currentViewMonth = nextMonth
|
||||
updateCalendar()
|
||||
return
|
||||
}
|
||||
@@ -778,36 +783,28 @@ class MainActivity : AppCompatActivity() {
|
||||
Log.w("MainActivity", "Failed to capture snapshot for month transition", e)
|
||||
}
|
||||
|
||||
// 2. Update to new month immediately
|
||||
currentViewMonth = if (direction > 0) {
|
||||
currentViewMonth.plusMonths(1)
|
||||
} else {
|
||||
currentViewMonth.minusMonths(1)
|
||||
}
|
||||
updateCalendar()
|
||||
|
||||
// 3. Prepare incoming new month card on top
|
||||
// 2. Position top card offscreen before loading
|
||||
card.translationX = if (direction > 0) width else -width
|
||||
card.alpha = 1.0f
|
||||
card.cardElevation = dpToPx(8f).toFloat()
|
||||
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
|
||||
|
||||
// 4. Slide top new month card smoothly into position
|
||||
card.animate()
|
||||
.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
|
||||
snapshot.animate()
|
||||
.scaleX(0.94f)
|
||||
.scaleY(0.94f)
|
||||
@@ -817,6 +814,7 @@ class MainActivity : AppCompatActivity() {
|
||||
.setInterpolator(fluidInterpolator)
|
||||
.start()
|
||||
}
|
||||
}
|
||||
|
||||
private fun formatRemainingDays(days: Float): String {
|
||||
return if (days == days.toInt().toFloat()) {
|
||||
|
||||
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_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_plus_circle"
|
||||
app:tint="@color/primary"/>
|
||||
android:src="@drawable/ic_tide"
|
||||
app:tint="#0EA5E9"/>
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -120,8 +120,8 @@
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_settings"
|
||||
app:tint="@color/primary"/>
|
||||
android:src="@drawable/ic_palette"
|
||||
app:tint="#AF52DE"/>
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
@@ -260,7 +260,7 @@
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_memo"
|
||||
app:tint="@color/primary"/>
|
||||
app:tint="#0284C7"/>
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
@@ -309,7 +309,7 @@
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_bell"
|
||||
app:tint="@color/primary"/>
|
||||
app:tint="#FF9500"/>
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
@@ -357,8 +357,8 @@
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_plus_circle"
|
||||
app:tint="@color/primary"/>
|
||||
android:src="@drawable/ic_share"
|
||||
app:tint="#34C759"/>
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_settings"
|
||||
app:tint="@color/primary"/>
|
||||
android:src="@drawable/ic_factory"
|
||||
app:tint="#007AFF"/>
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
@@ -102,8 +102,8 @@
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_check"
|
||||
app:tint="@color/primary"/>
|
||||
android:src="@drawable/ic_user"
|
||||
app:tint="#34C759"/>
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
@@ -288,8 +288,8 @@
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_plus_circle"
|
||||
app:tint="@color/primary"/>
|
||||
android:src="@drawable/ic_layers"
|
||||
app:tint="#00C7BE"/>
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@@ -81,7 +81,8 @@
|
||||
android:gravity="center"
|
||||
android:text="메모내용\n2줄\n3줄\n4줄"
|
||||
android:textSize="9.5sp"
|
||||
android:textColor="@color/secondary"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
android:lineSpacingMultiplier="1.05"
|
||||
android:maxLines="4"
|
||||
android:ellipsize="end"
|
||||
|
||||
+21
-18
@@ -6,22 +6,25 @@ import shutil
|
||||
|
||||
token = "e3b515eaa0a6683c921ca3bf718e281ed30a6075"
|
||||
owner_repo = "sanjeok77/ShiftRing"
|
||||
tag = "v1.0.5"
|
||||
title = "v1.0.5 - 메모 아이콘 정리, 삼성 One UI 8.5/9.0 알람 화면 리디자인, 달력 초기 깜빡임 해소 및 카드 스택 레이어 전환 애니메이션 적용"
|
||||
body = """## 🚀 ShiftRing v1.0.5 릴리즈
|
||||
tag = "v1.0.6"
|
||||
title = "v1.0.6 - 달력 월간 이동 깜빡임 완전 제거, 하루 메모 고가독성 색상 적용, 부가기능 및 기본 설정(근무 관리) 아이콘/색상 개편"
|
||||
body = """## 🚀 ShiftRing v1.0.6 릴리즈
|
||||
|
||||
### 🌟 주요 변경 및 개선 사항
|
||||
1. **하루 메모 불필요한 하단 아이콘 제거 (`item_day.xml`, `CalendarAdapter.kt`)**:
|
||||
- 메모 텍스트가 이미 상단/중앙에 4줄로 표시되므로 중복되던 하단 메모/수정 아이콘을 깔끔하게 제거하여 셀 공간 최적화
|
||||
2. **알람 울림/해제 화면 삼성 One UI 8.5/9.0 최신 디자인 전면 개편 (`activity_alarm.xml`, `AlarmActivity.kt`)**:
|
||||
- 상단 근무 라벨 뱃지 + 대형 현대적 시계 타이포그래피 + 날짜 정보 일원화
|
||||
- 중앙 와이드 글래스 캡슐 허브 다시 울림(스누즈) 버튼 탑재
|
||||
- 하단 듀얼 펄스 웨이브 앰비언트 글로우 및 옴니 다이렉션 스와이프/탭 해제 컨트롤 적용
|
||||
3. **앱 초기 실행 시 달력 화면 깜빡임(Flicker) 완벽 해소 (`MainActivity.kt`)**:
|
||||
- `RecyclerView` 불필요한 기본 애니메이터 제거 및 어댑터/행 높이 재계산 로직 최적화로 초기 진입 시 잔상 없이 즉각 로딩
|
||||
4. **달력 월간 이동 시 카드 스택(Card Stack) 레이어 전환 애니메이션 구현 (`MainActivity.kt`, `activity_main.xml`)**:
|
||||
- 이전 달 화면이 하단에 베이스로 자연스럽게 깔리고(0.94x 축소 및 0.35 알파 페이드), 새 달 카드가 상단에서 부드럽게 감속 슬라이드 오버되는 끊김 없는 유체 모션 적용
|
||||
5. **Android 14/15 호환 및 정식 서명키(release.jks) 적용**"""
|
||||
1. **달력 월간 이동 시 깜빡임(Flicker) 완전 제거 (`MainActivity.kt`)**:
|
||||
- 이동 대상 월의 데이터 로딩 및 어댑터 갱신을 슬라이드 애니메이션 시작 전 완벽히 완료하여, 전환 도중의 화면 깜빡임과 데이터 리로드 잔상을 100% 제거
|
||||
2. **하루 메모 가독성 극대화 (`item_day.xml`)**:
|
||||
- 기존 연한 녹색 대신 고대비 볼드 텍스트(`@color/text_primary`, `textStyle="bold"`)를 적용하여 어떤 테마에서도 메모 내용이 선명하게 읽히도록 개선
|
||||
3. **부가기능 탭 아이콘 및 고유 색상 전면 개편 (`fragment_settings_additional.xml`)**:
|
||||
- 물때 정보 표시: 물결 아이콘 (`ic_tide`, 스카이블루 `#0EA5E9`)
|
||||
- 화면 테마 설정: 팔레트 아이콘 (`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"
|
||||
if not os.path.exists(apk_path):
|
||||
@@ -59,10 +62,10 @@ print("Updated app.apk at project root.")
|
||||
|
||||
# Update version.json
|
||||
v_info = {
|
||||
"versionCode": 105,
|
||||
"versionName": "1.0.5",
|
||||
"versionCode": 106,
|
||||
"versionName": "1.0.6",
|
||||
"apkUrl": direct_url,
|
||||
"changelog": "v1.0.5: 메모 아이콘 정리, 삼성 최신 알람 화면 개편, 달력 초기 깜빡임 해소, 카드 스택 레이어 전환 애니메이션 적용",
|
||||
"changelog": "v1.0.6: 월간 이동 깜빡임 완전 제거, 메모 고가독성 텍스트, 부가기능 및 근무 관리 아이콘/색상 개편",
|
||||
"forceUpdate": False
|
||||
}
|
||||
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"
|
||||
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", "commit", "-m", commit_msg], check=True)
|
||||
subprocess.run(["git", "push", "origin", "main"], check=True)
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"versionCode": 105,
|
||||
"versionName": "1.0.5",
|
||||
"apkUrl": "https://git.webpluss.net/attachments/b03485a6-cae4-471d-81c0-4f6288d3aa9f",
|
||||
"changelog": "v1.0.5: 메모 아이콘 정리, 삼성 최신 알람 화면 개편, 달력 초기 깜빡임 해소, 카드 스택 레이어 전환 애니메이션 적용",
|
||||
"versionCode": 106,
|
||||
"versionName": "1.0.6",
|
||||
"apkUrl": "https://git.webpluss.net/attachments/39cd66d9-61cd-442a-8f47-95b967b41bc4",
|
||||
"changelog": "v1.0.6: 월간 이동 깜빡임 완전 제거, 메모 고가독성 텍스트, 부가기능 및 근무 관리 아이콘/색상 개편",
|
||||
"forceUpdate": false
|
||||
}
|
||||
Reference in New Issue
Block a user