Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2f2e05d4c | ||
|
|
8888150c84 | ||
|
|
3ace249761 | ||
|
|
77eea9cf11 | ||
|
|
a00f009b44 | ||
|
|
16dc0fed9e | ||
|
|
d993619ff8 | ||
|
|
d012b178b7 | ||
|
|
a356b3c581 | ||
|
|
2f7361bbc9 | ||
|
|
aa63d86a10 | ||
|
|
eb6aad8527 | ||
|
|
975413a2d6 | ||
|
|
696083060d | ||
|
|
d245aeb7d5 | ||
|
|
f5b2f72a0b | ||
|
|
80eb086a59 |
@@ -20,8 +20,8 @@ android {
|
|||||||
applicationId = "com.example.shiftalarm"
|
applicationId = "com.example.shiftalarm"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 101
|
versionCode = 118
|
||||||
versionName = "1.0.1"
|
versionName = "1.1.8"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,19 +6,16 @@
|
|||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
|
||||||
|
|
||||||
<!-- Alarm & Full Screen -->
|
<!-- Alarm & Full Screen -->
|
||||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
|
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
|
||||||
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />
|
|
||||||
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
|
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
|
||||||
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
|
|
||||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||||
|
|
||||||
<!-- Service & Notification -->
|
<!-- Service & Notification -->
|
||||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
@@ -44,12 +41,11 @@
|
|||||||
android:name=".AlarmActivity"
|
android:name=".AlarmActivity"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:excludeFromRecents="true"
|
android:excludeFromRecents="true"
|
||||||
android:taskAffinity=""
|
|
||||||
android:theme="@style/Theme.AppCompat.NoActionBar"
|
android:theme="@style/Theme.AppCompat.NoActionBar"
|
||||||
android:showWhenLocked="true"
|
android:showWhenLocked="true"
|
||||||
android:turnScreenOn="true"
|
android:turnScreenOn="true"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleInstance"
|
||||||
android:documentLaunchMode="never"
|
android:documentLaunchMode="never"
|
||||||
android:configChanges="orientation|screenSize|keyboardHidden"
|
android:configChanges="orientation|screenSize|keyboardHidden"
|
||||||
android:allowEmbedded="false"
|
android:allowEmbedded="false"
|
||||||
@@ -96,12 +92,8 @@
|
|||||||
|
|
||||||
<service
|
<service
|
||||||
android:name=".AlarmForegroundService"
|
android:name=".AlarmForegroundService"
|
||||||
android:foregroundServiceType="specialUse"
|
android:foregroundServiceType="mediaPlayback"
|
||||||
android:exported="false">
|
android:exported="false" />
|
||||||
<property
|
|
||||||
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
|
|
||||||
android:value="Alarm playback and ringing notification" />
|
|
||||||
</service>
|
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.core.content.FileProvider"
|
android:name="androidx.core.content.FileProvider"
|
||||||
@@ -112,6 +104,7 @@
|
|||||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||||
android:resource="@xml/provider_paths" />
|
android:resource="@xml/provider_paths" />
|
||||||
</provider>
|
</provider>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@@ -1,597 +1,86 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [1.5.2] - 2026-03-13
|
## [1.1.8] - 2026-08-17
|
||||||
### Fixed
|
### Fixed
|
||||||
- **달력 스와이프 애니메이션 버그 수정**: GestureDetector의 onDown 메서드가 true를 반환하도록 수정하여 스와이프 제스처가 정상적으로 작동하도록 개선
|
- **교육 근무 변경 시 상단 알람 표시 및 실제 알람 완전 유지**: 교육으로 변경해도 상단 오늘/내일 알람 시간이 정상 표시되고 원래 근무 알람이 그대로 울림
|
||||||
- **업데이트 다이얼로그 반복 표시 문제**: 버전 코드 1152로 업데이트하여 불필요한 업데이트 알림 제거
|
|
||||||
|
|
||||||
### Added
|
## [1.1.7] - 2026-08-17
|
||||||
- **토요일 연장근무 계산 기능**: 설정 → 근무 관리에 토요일 근무 횟수 * 2시간 계산 표시
|
|
||||||
- **사용 설명서 개선**: 연차 설정 및 토요일 연장근무 기능 반영, 섹션 구조 정리
|
|
||||||
|
|
||||||
## [1.5.1] - 2026-03-13
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- **달력 스와이프 애니메이션 버그 수정**: 스와이프 제스처로 월 이동 시 애니메이션이 적용되지 않던 문제 해결
|
- **교육 근무 변경 시 원래 근무 알람 완전 유지**: 달력에서 교육으로 변경해도 원래 근무 알람이 정상 울리고, 상단 오늘/내일 알람 시간 표시도 정상 유지
|
||||||
- **업데이트 무한 버그 수정**: 동일 버전 확인 시 불필요한 토스트 표시 개선
|
|
||||||
|
|
||||||
|
## [1.1.6] - 2026-08-15
|
||||||
|
### Fixed
|
||||||
|
- **알람 추가 시 기본 볼륨 0 버그 수정**: 시스템 알람 스트림 볼륨을 항상 최대치로 강제 설정하여 새 알람 추가 시 볼륨이 0이 되는 문제 원천 차단
|
||||||
|
- **최초 설치 시 권한 모달 팝업 루프 버그 수정**: 시스템 설정 화면이 잠깐 보였다가 모달로 되돌아가는 현상을 isPermissionFlowActive 플래그로 완전 차단. onResume 재진입 시 중복 모달 표시 방지
|
||||||
|
|
||||||
|
## [1.1.5] - 2026-08-14
|
||||||
|
### Fixed
|
||||||
|
- **근무 변경 모달 팝업 버튼 겹침 현상 완벽 수정**: ConstraintLayout Flow 충돌을 제거하고 3행 리니어 그리드로 전면 개편하여 모든 버튼이 겹침 없이 정렬되도록 수정
|
||||||
|
- **업데이트 정보 자동 기입 및 실시간 동기화 완전 자동화**: 릴리즈 시 체인지로그 및 원격 동기화가 누락 없이 자동 기입되도록 시스템 고도화
|
||||||
|
|
||||||
|
## [1.1.4] - 2026-08-14
|
||||||
### Added
|
### Added
|
||||||
- **토요일 연장근무 계산 기능**: 설정 → 근무 관리에 토요일 근무 횟수 * 2시간 계산 표시
|
- **기기 사용 중 전체화면 알람 팝업 보장**: SYSTEM_ALERT_WINDOW 및 백그라운드 액티비티 시작 모드 적용으로 사용 중에도 전체화면 알람창 즉시 표시
|
||||||
- **사용 설명서 개선**: 최신 기능 반영 및 가독성 향상
|
- **설정 화면 상단 닫기(X) 아이콘 배치**: 하단 고정 닫기 바를 제거하고 상단에 배치하여 탭 전체 화면 공간 극대화
|
||||||
|
|
||||||
### Changed
|
## [1.1.3] - 2026-08-14
|
||||||
- 업데이트 확인 로직 최적화: 동일 버전일 때 사용자 경험 개선
|
### Added
|
||||||
|
- **하루 메모 저장/삭제 아이콘 원형 컨테이너 적용**: 설정 스타일의 블루(저장) / 레드(삭제) 아이콘 컨테이너로 통일하여 세련된 디자인 제공
|
||||||
|
- **사용 설명서 전면 최신화 및 가독성 혁신**: 마크다운 기호 없이 고대비 컬러 키워드 강조 및 닫기 버튼 엑스(X) 아이콘 교체
|
||||||
|
- **공지사항(업데이트 정보) 자동 연동**: Gitea 실시간 릴리즈 및 로컬 체인지로그 동적 최신화
|
||||||
|
|
||||||
## [1.5.0] - 2026-03-13
|
## [1.1.2] - 2026-08-14
|
||||||
|
### Added
|
||||||
|
- **하루 메모 상단 즉시 저장 버튼 탑재**: 가상 키보드가 떠 있는 상태에서도 키보드 위 헤더에서 원터치로 즉각 저장 가능
|
||||||
|
- **뒤로가기/바깥 터치 시 메모 자동 저장(Auto-Save)**: 실수로 창을 닫아도 작성 중인 메모 100% 자동 보존
|
||||||
|
- **다이얼로그 스크롤 및 소프트 키보드 리사이징**: NestedScrollView 적용으로 4줄 메모 작성 시에도 화면 잘림 없음
|
||||||
|
|
||||||
|
## [1.1.1] - 2026-08-14
|
||||||
|
### Added
|
||||||
|
- **전체 알람 마스터 스위치 및 안전 OFF 모달 팝업**: 원터치 MaterialSwitch 전환 및 해제 시 확인/취소 경고창 제공
|
||||||
|
- **앱 정보 설정 화면 바운스 현상 수정**: 시스템 전체 권한 진입 시 원치 않는 즉시 복귀 현상 방지
|
||||||
|
- **데이터 초기화 4단계 세분화**: 개별 근무/알람 전체 삭제, 개별 근무 삭제, 알람 삭제, 전체 데이터 완전 초기화
|
||||||
|
|
||||||
|
## [1.1.0] - 2026-08-14
|
||||||
### Improved
|
### Improved
|
||||||
- **달력 월 이동 애니메이션 대폭 개선**: AccelerateDecelerateInterpolator 적용으로 자연스러운 가속/감속 곡선 구현
|
- **메인 달력 '오늘의 근무' 폰트 확대**: 13sp에서 18sp 볼드로 대폭 키워 한눈에 식별 가능
|
||||||
- **스케일 효과 추가**: 월 전환 시 0.95배 축소/확대 효과로 깊이감 있는 화면 전환 제공
|
- **설정 드롭박스 텍스트 가운데 정렬**: 근무 회사, 나의 근무 반, 화면 테마, 총 부여 연차 선택 텍스트 중앙 정렬
|
||||||
- **애니메이션 지속시간 최적화**: 200ms → 280ms로 조정하여 더 부드러운 전환 경험
|
- **전체 알람 폰트 크기 통일**: 알람 설정 상단 텍스트 16sp 볼드로 확대
|
||||||
- **알파 페이드 개선**: 0.5 → 0.7로 조정하여 전환 중 가독성 향상
|
|
||||||
|
|
||||||
### Changed
|
## [1.0.9] - 2026-08-14
|
||||||
- 사용 설명서(MANUAL.md) 전면 개편: 현재 기능 정확히 반영, 섹션 구조 명확화
|
|
||||||
- 애니메이션 인터폴레이터 및 스케일 효과 적용으로 프리미엄 캘린더 앱 수준의 UX 구현
|
|
||||||
|
|
||||||
## [1.4.0] - 2026-03-13
|
|
||||||
### Improved
|
### Improved
|
||||||
- **달력 월 이동 애니메이션 개선**: 월 전환 시 부드러운 슬라이드와 스케일 효과가 적용되어 자연스러운 화면 전환 제공
|
- **상단 여백 최적화**: 메인 달력 '교대링' 상단 및 설정 화면 상단 불필요한 빈 여백 완전 제거
|
||||||
- **AccelerateDecelerateInterpolator 적용**: 가속/감속 곡선을 사용하여 더욱 자연스러운 애니메이션 구현
|
- **원클릭 인앱 APK 업데이트 복원**: 앱 내 진행률 다이얼로그 및 패키지 인스톨러 연동
|
||||||
- **사용 설명서 최신화**: 현재 기능을 정확히 반영하도록 전면 업데이트
|
|
||||||
|
|
||||||
### Changed
|
## [1.0.8] - 2026-08-14
|
||||||
- 애니메이션 지속시간을 200ms에서 280ms로 조정하여 더 부드러운 전환 제공
|
|
||||||
- 알파 페이드를 0.5에서 0.7로 조정하여 가독성 향상
|
|
||||||
- 스케일 효과(0.95) 추가로 깊이감 있는 화면 전환 구현
|
|
||||||
|
|
||||||
## [1.1.3] - 2026-02-16
|
|
||||||
### Added
|
### Added
|
||||||
- **앱 안정성 설정 통합**: 설정 화면에서 '배터리 최적화 제외', '다른 앱 위에 표시', '전체화면 알림' 등 알람 가동에 필수적인 권한 상태를 한눈에 확인하고 직접 설정할 수 있는 섹션 추가
|
- **시스템 권한 설정 후 실시간 자동 복귀**: 권한 토글 On 시 뒤로가기 없이 앱으로 즉시 0.4초 내 자동 복귀
|
||||||
- **안드로이드 16 잠금화면 우회**: 최신 OS에서도 지문/패턴 해제 없이 알람 화면이 즉시 나타나도록 `requestDismissKeyguard` 로직 적용 및 안정성 강화
|
- **오늘의 근무 레이블 컬러 브랜딩**: (내 반) 표기 제거 및 '휴무'(빨강), '주간'(노랑), '석간'(청록), '야간'(다크) 고유 컬러 적용
|
||||||
|
- **최신 버전 확인 전용 아이콘**: ic_update 인디고 벡터 아이콘 적용
|
||||||
|
|
||||||
## [1.1.2] - 2026-02-15
|
## [1.0.7] - 2026-08-14
|
||||||
### Fixed
|
### Fixed
|
||||||
- **알람 삭제 버그**: 알람이 켜진 상태에서 삭제해도 알람이 울리던 문제 수정
|
- **Play Protect 유해한 앱 경고 원천 제거**: 매니페스트 불필요 권한 정리 및 미디어 재생 포그라운드 서비스 표준화
|
||||||
- **삭제 시 자동 취소**: 알람 삭제 시 시스템에 등록된 향후 모든 스케줄을 즉시 취소하도록 로직 강화
|
- **폰 사용 중 전체화면 알람 즉시 표시**: 잠금 해제/화면 켜짐 상태에서도 전체화면 AlarmActivity 최상단 표시 보장
|
||||||
|
|
||||||
## [1.1.1] - 2026-02-15
|
## [1.0.6] - 2026-08-14
|
||||||
### Fixed
|
|
||||||
- **잠금 화면 위 표시**: 잠금 화면을 풀지 않아도 알람 해제 화면이 즉시 나타나도록 윈도우 플래그 및 핸들링 로직 수정 (Android 14/15 완벽 대응)
|
|
||||||
- **전체화면 권한 안내**: 권한이 누락된 경우 설정 화면으로 바로 이동하도록 안내 로직 개선
|
|
||||||
|
|
||||||
## [1.1.0] - 2026-02-15
|
|
||||||
### 🚀 알람 신뢰도 100% 달성 및 시스템 고도화
|
|
||||||
- **3단계 알람 안전장치 도입**:
|
|
||||||
- **Room DB 전환**: 사용자 알람 데이터를 SQLite 데이터베이스로 마이그레이션하여 대규모 데이터 처리 및 보존 안정성 확보
|
|
||||||
- **AlarmClock API 최우선 순위**: 절전 모드를 무력화하는 최고 수준의 신뢰도 API 적용. 상단바 알람 아이콘 활성화로 예약 상태 가시성 확보
|
|
||||||
- **30일 확장 동기화 엔진**: 근무 변경이나 설정 수정 시 향후 30일간의 알람을 즉시 재계산 및 예약
|
|
||||||
- **권한 및 알림 일원화**:
|
|
||||||
- **통합 권한 센터**: 필수 권한(정확한 알람, 배터리 제외, 전체화면 알림)을 한 화면에서 순차적으로 설정할 수 있도록 흐름 개선
|
|
||||||
- **단일 알림 포그라운드 서비스 적용**: 알람 알림이 중복되거나 지워지지 않도록 포그라운드 서비스 기반의 단일 알림 시스템 구축
|
|
||||||
- **레거시 제거 및 최적화**: 미사용 파라미터 제거 및 알람 엔진 성능 최적화
|
|
||||||
|
|
||||||
## [1.0.1] - 2026-02-14
|
|
||||||
### Added
|
### Added
|
||||||
- **프리미엄 알람 디자인**: `lock.html` 디자인을 기반으로 한 화려한 알람 화면 도입 (오로라 펄스 애니메이션, 글래스모피즘 버튼)
|
- **기본 설정 및 알람 설정 One UI 8.5 아이콘 리뉴얼**: 각 설정 항목에 최적화된 맞춤형 컬러 아이콘 적용
|
||||||
- **달력 년/월 휠 선택**: 달력 상단 년/월 클릭 시 휠 다이얼로 즉시 이동하는 기능 추가
|
|
||||||
- **알람 설정 최적화**: 알람 목록 로딩 속도 개선 및 사운드 타이틀 캐싱 적용
|
|
||||||
|
|
||||||
### Changed
|
## [1.0.5] - 2026-08-14
|
||||||
- **마스터 알람 스위치**: 거대한 카드 대신 세련된 텍스트 레이블 형태로 알람 설정 좌측 상단에 배치
|
|
||||||
- **토글 버튼 개선**: 이질적인 회색 배경을 제거하고 부드러운 Material 3 애니메이션 스위치 적용
|
|
||||||
- **사용 설명서 개편**: 최신 기능(년/월 피커, 신규 알람 UI 등)에 맞춰 상세 설명 업데이트
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- **설정 진입 속도**: 알람 설정 탭 클릭 시 발생하던 미세한 지연 시간 단축
|
|
||||||
|
|
||||||
## [0.9.1] - 2026-02-11
|
|
||||||
### Fixed
|
|
||||||
- **알람 엔진 안정화**: PendingIntent ID 충돌 및 권한 누락 안내 기능 추가
|
|
||||||
- **배경 작업 최적화**: 부팅 후 알람 복구 로직 중복 실행 방지 및 효율성 개선
|
|
||||||
- **보안 강화**: 앱 서명 비밀번호 분리 관리 및 루팅 기기 대응 준비
|
|
||||||
- **시간대 통일**: 모든 알람 로직에 Asia/Seoul 표준 시간대 강제 적용
|
|
||||||
|
|
||||||
## [0.9.0] - 2026-02-11
|
|
||||||
### Added
|
|
||||||
- **One UI 8 디자인 완성**: 설정 화면, 알람 설정, 공지사항 등 앱 전반에 걸쳐 One UI 8 스타일의 카드 레이아웃 및 28dp 라운딩 적용
|
|
||||||
- **자동 업데이트 확인**: 앱 접속 시 최신 버전을 자동으로 체크하고 원클릭으로 업데이트를 수행하는 스마트 엔진 탑재
|
|
||||||
- **UI 일관성 강화**: 모든 다이얼로그 및 팝업에 고도화된 Glassmorphism 디자인과 통일된 여백 시스템 도입
|
|
||||||
- **상태 기반 헤더**: 메인 화면 상단에 오늘 근무 및 선택된 반 정보를 실시간으로 표시하는 다이나믹 헤더 추가
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- **아이콘 시스템 정밀화**: 설정 아이콘 및 액션 버튼에 Lucide Icons 스타일 적용 및 시인성 개선
|
|
||||||
- **가독성 최적화**: 시간 선택기(TimePickerDialog)를 최신 시스템 테마로 업데이트하고 폰트 가독성 상향
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.8.0] - 2026-02-11
|
|
||||||
### Added
|
|
||||||
- **One UI 8 스타일 적용**: Jetpack Compose 기반의 최신 삼성 One UI 8 디자인 시스템 통합 (Soft Blur, Pill-shape, Dynamic Color 지원)
|
|
||||||
- **알람 신뢰도 엔진 (Android 14+ 대응)**: 포그라운드 서비스(shortService) 및 배터리 최적화 예외 유도 로직을 통해 삼성 기기에서의 95%+ 알람 성공률 확보
|
|
||||||
- **정확한 알람 권한 관리**: `AlarmPermissionUtil`을 통해 Android 14+ 알람/리마인더 권한 설정 인터페이스 개선
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- **빌드 시스템 인프라**: Jetpack Compose 및 Material 3 환경 구축
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.6.3] - 2026-02-10
|
|
||||||
### Changed
|
|
||||||
- **리브랜딩**: 앱 전체에서 '닥잡아/dakjaba' 표기를 '교대링(Shiftring)'으로 통일
|
|
||||||
- **달력 근무 표기 변경**: 약어(주/석/야/맞/휴) → 풀네임(주간/석간/야간/맞교대/휴무)
|
|
||||||
- **메모 표시 레이아웃 수정**: 근무 텍스트 아래에 정확히 배치되도록 마진 및 제약조건 재설정
|
|
||||||
- **사용설명서 전면 업데이트**: 이모지 대신 Lucide 스타일 텍스트 아이콘 사용, 알람 테스트 안내 추가
|
|
||||||
- **알림 텍스트 브랜딩**: '교대 근무 알람' → '교대링 알람'
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- **알람 테스트 수정**: 알람 테스트 버튼이 실제로 알람을 트리거하도록 테스트 알람 바이패스 로직 추가
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.5.8] - 2026-02-10
|
|
||||||
### Added
|
|
||||||
- **알람 동기화 시스템 전면 재정비**: 알람이 울리기 직전 근무 종류뿐만 아니라 설정된 '시간'까지 재검증하는 2중 동기화 로직을 도입하여, 어떤 상황에서도 정확한 알람이 울리도록 개선
|
|
||||||
### Fixed
|
|
||||||
- **다크 모드 눈 피로도 감소**: 근무별 배경색의 채도를 더 낮추고 부드러운 톤으로 조정하여 야간 사용 시 시각적 편안함 증대
|
|
||||||
- **다크 모드 가독성 수정**: 알람 추가 및 근무 변경 팝업의 배경과 텍스트 시인성 확보
|
|
||||||
- **버그 수정**: 야간 맞교대 근무 시 알람 시간 키값이 잘못 지정되던 문제 수정
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.5.7] - 2026-02-10
|
|
||||||
### Fixed
|
|
||||||
- **알람 동기화 긴급 수정**: 근무가 변경된 경우 이전 알람이 울리지 않도록 수신부(AlarmReceiver)에서 현재 근무를 재검증하는 로직 추가
|
|
||||||
- **다크 모드 팝업 시인성 개선**: 다크 모드에서 '알람 추가', '근무 변경' 팝업의 배경색이 보이지 않던 문제 수정 (테마 대응 컬러 적용)
|
|
||||||
- **근무 배경 색상 최적화**: 다크 모드에서 근무 배경색의 채도를 낮추어 눈의 피로도를 줄임
|
|
||||||
### Changed
|
|
||||||
- **용어 통일**: '스누즈' 표기를 '다시 울림'으로 일괄 변경
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.5.6] - 2026-02-09
|
|
||||||
### Changed
|
|
||||||
- **'오늘' 버튼 디자인 개편**: 달력 그리드 디자인과 조화로운 미니멀한 테두리 스타일로 변경
|
|
||||||
- **가독성 개선**: 라이트 모드에서 시인성이 낮았던 민트색 섹션 제목을 시인성이 높은 진보라색으로 변경하여 가독성 향상
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.5.5] - 2026-02-09
|
|
||||||
### Changed
|
|
||||||
- **설정 화면 레이아웃 최적화**: '회사 선택'과 '반 선택'을 한 행에 2열 그리드로 배치하여 공간 효율성 개선
|
|
||||||
- **용어 순화 및 변경**: 알람 설정 내 '스누즈 및 소리'를 사용자 친화적인 '다시 울림 및 소리'로 명칭 변경
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.5.4] - 2026-02-09
|
|
||||||
### Fixed
|
|
||||||
- **다크 모드 빈 격자 색상 수정**: 달력 시작/종료 전후의 빈 격자가 다크 모드에서도 테마에 맞는 색상으로 표시되도록 수정
|
|
||||||
### Improved
|
### Improved
|
||||||
- **공간 활용성 극대화**: 각 격자의 높이를 상향(82dp) 조정하여, 하단의 남는 공간을 최소화하고 화면을 더 꽉 차게 보이도록 개선
|
- **달력 월 이동 부드러운 카드 레이어 애니메이션**: 월간 전환 시 깜빡임 없이 부드러운 페이드 & 슬라이드 전환 연출
|
||||||
|
- **하루 메모 색상 가독성 향상**: 진한 고대비 컬러 적용으로 메모 텍스트 시인성 극대화
|
||||||
|
|
||||||
---
|
## [1.0.4] - 2026-08-14
|
||||||
|
|
||||||
## [0.5.3] - 2026-02-09
|
|
||||||
### Fixed
|
|
||||||
- **다크 모드 완벽 지원**: 하드코딩된 색상을 테마 리소스(bg_grid_cell_default, grid_divider 등)로 교체하여 다크 모드에서도 달력이 정상적으로 표시되도록 수정
|
|
||||||
- **사용자 편의성 강화**: 메인 화면의 알람 시간 표시 영역을 터치하면 즉시 알람 설정 화면으로 이동하도록 개선
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.5.2] - 2026-02-09
|
|
||||||
### Added
|
### Added
|
||||||
- **그리드 완성도 향상**: 달력 시작일 이전의 빈 공간에도 격자선을 표시하여 디자인적 일관성 확보
|
- **삼성 시계 최신 One UI 알람 해제 화면 적용**: 대형 시간 타이포그래피, 스누즈 캡슐 허브, 전방향 스와이프 및 탭 해제 UI 구현
|
||||||
- **가독성 최적화**: 근무 표시 글자 크기 확대 및 격자 높이 상향 (66dp)
|
|
||||||
- **UI 시각적 개선**: '오늘' 버튼 디자인 개선 및 배경색/테두리 최적화
|
|
||||||
- **대비 및 명시성 강화**: 흰색 텍스트가 잘 보이지 않던 팀(A반)의 배경색을 더욱 진하게 조정
|
|
||||||
- **오늘 강조 변경**: 오늘 날짜를 연한 파란색 배경으로 강조하여 시각적 직관성 제공
|
|
||||||
|
|
||||||
---
|
## [1.0.3] - 2026-08-13
|
||||||
|
|
||||||
## [0.5.1] - 2026-02-09
|
|
||||||
### Added
|
### Added
|
||||||
- **격자 디자인 고도화**: 일반 달력처럼 배경을 흰색으로 변경하고, 근무 표시(주, 석, 야 등)에만 개별 배경색 적용
|
- **하루 메모 4줄 확장 및 날짜 옆 근무 뱃지**: 메모가 있는 날은 근무 뱃지가 날짜 옆으로 축소 이동하여 최대 4줄 메모 표시
|
||||||
- **공휴일 정보 통합**: 교대 달력 모드에서도 근무 표시 옆에 공휴일 이름을 함께 표시
|
- **알람 추가 시 기본 볼륨 최대치(100%) 보정**
|
||||||
- **화면 실용성 극대화**: 상단 헤더 및 알람바 높이를 축소하여 6주 달력도 스크롤 없이 한 화면에 표시
|
|
||||||
- **가독성 개선**: 근무 글자를 칸 좌측 상단 모서리에 밀착 배치하고 최적화된 글자 크기 적용
|
|
||||||
|
|
||||||
---
|
## [1.0.0] - 2026-08-13
|
||||||
|
|
||||||
## [0.5.0] - 2026-02-09
|
|
||||||
### Added
|
### Added
|
||||||
- **달력 디자인 전면 개편**: 카드 스타일에서 세련된 격자(Grid) 스타일로 변경
|
- **교대링(ShiftRing) 정식 1.0 릴리즈**: 365일 실시간 교대근무 캘린더, 정밀 스마트 알람, One UI 8.5 글래스모피즘 디자인 시스템 구축
|
||||||
- **근무 표기 최적화**: 좌측 상단에 한 글자(주, 석, 야, 맞, 휴)로 직관적인 근무 표시
|
|
||||||
- **가독성 강화**: 중앙에 큰 날짜 배치 및 날짜 옆 작은 공휴일 마커 추가
|
|
||||||
- **색상 체계 변경**: 주간(레몬), 석간(회색), 야간(검정), 휴무(빨강), 맞교대(보라)로 배경색 구분
|
|
||||||
- **전체 화면 최적화**: 불필요한 여백을 제거하고 화면을 최대한 활용하도록 레이아웃 수정
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.4.4] - 2026-02-09
|
|
||||||
### Changed
|
|
||||||
- **달력 행 수 최적화**: 1~4주만 필요한 달은 5행(35셀)만 표시하고 스크롤 없이 고정, 5주 이상 필요한 달만 6행(42셀)으로 스크롤 활성화
|
|
||||||
- **안전한 최적화 방식**: 레이아웃 높이 수정 없이, 데이터 패딩과 스크롤 설정만 조정하여 해상도에 관계없이 안정적으로 동작
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.4.3] - 2026-02-09
|
|
||||||
### Fixed
|
|
||||||
- **달력 화면 완전 복원**: 0.3.9 안정 버전의 달력 코드로 완전 롤백하여 달력이 보이지 않던 문제를 완벽하게 해결
|
|
||||||
- **해상도 최적화 이슈 제거**: 불안정한 동적 높이 조절 로직을 모두 제거하고 검증된 고정 레이아웃으로 복원
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.4.2] - 2026-02-09
|
|
||||||
### Fixed
|
|
||||||
- **달력 화면 완전 복구**: 달력 항목의 높이를 70dp로 명시적으로 고정하여, 일부 기기에서 레이아웃 측정 오류로 달력 내용이 보이지 않던 문제를 완벽하게 해결
|
|
||||||
- **스크롤 기능 강화**: 모든 해상도에서 화면 잘림 없이 달력을 확인할 수 있도록 스크롤 기능 상시 활성화 유지
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.4.1] - 2026-02-09
|
|
||||||
### Fixed
|
|
||||||
- **스크롤 제한 긴급 수정**: 작은 화면의 기기에서 달력 하단이 잘리는 현상을 수정하기 위해 스크롤 기능을 상시 활성화
|
|
||||||
- **달력 레이아웃 안정화**: 해상도 최적화 로직의 일부 불안정성을 제거하고 표준 높이(68dp)로 복구하여 안정성 확보
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.4.0] - 2026-02-09
|
|
||||||
### Added
|
|
||||||
- **버전 넘버링 체계 확립**: Patch가 9를 넘으면 Minor를 올리는 규칙 적용 (0.3.9 -> 0.4.0)
|
|
||||||
- **해상도별 달력 최적화**: 5행 달력은 스크롤 없이 고정하고, 6행일 때만 스크롤되도록 고도화
|
|
||||||
- **레이아웃 안정성**: 다양한 해상도의 폰에서도 달력 모양이 일정하게 유지되도록 수정
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- **메인 공간 및 UI 개선**: 0.3.10의 변경사항(헤더 축소, 버튼 강조 등)을 정식 반영
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.3.9] - 2026-02-09
|
|
||||||
### Added
|
|
||||||
- **오늘 버튼 동작 개선**: 달력에서 '오늘' 클릭 시 보고 있던 조와 상관없이 나의 본래 조와 오늘 날짜 달력으로 즉시 복귀
|
|
||||||
- **사용자 알람 연동 버그 수정**: 이제 사용자 알람 추가/수정 시에도 오늘 근무표를 확인하여 본인 근무와 일치할 때만 스케줄링되도록 수정
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- **업데이트 내역 가독성**: 변경사항 목록 하단에 불필요하게 표시되던 구분선(-) 제거
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- **기본 설정 가독성**: 회사/반 선택 레이블 폰트 크기 확대 및 굵게 표시하여 식별력 강화
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [v0.6.0] - 2026-02-12
|
|
||||||
### Added
|
|
||||||
- **Major Rebranding**: App name changed to **"교대링" (Shiftring)** with English locale support.
|
|
||||||
- **Room Database Migration**: Replaced `SharedPreferences` with Room DB for robust storage of shift overrides and memos.
|
|
||||||
- **Daily Memos**: Added ability to save and view daily notes on the calendar.
|
|
||||||
- **Lucide Icons**: Integrated modern Lucide iconography system across the app.
|
|
||||||
- **Advanced Alarm Synchronization**: Reliable "double-check" system ensuring alarms match current shift and time preferences.
|
|
||||||
- **Additional Features Tab**: New section in settings for upcoming capabilities.
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- **Dark Mode Visibility**: Improved "Night" (야간) shift visibility and dialog accessibility in dark theme.
|
|
||||||
- **Coroutines & Performance**: Refactored database operations to use Coroutines for smoother UI performance.
|
|
||||||
- **Icon Prefix**: Standardized all icons with `ic_` prefix.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.3.8] - 2026-02-09
|
|
||||||
### Added
|
|
||||||
- **지난 알람 숨김**: 오늘 이미 시간이 지난 사용자 알람은 달력 화면에서 표시되지 않도록 개선
|
|
||||||
- **가독성 향상**: 라이트 모드에서도 알람 시간이 잘 보이도록 색상 및 굵기 개선
|
|
||||||
|
|
||||||
### Updated
|
|
||||||
- **사용 설명서 개편**: 최신 기능 반영 및 불필요한 서식을 제거하여 깔끔하게 정리
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.3.7] - 2026-02-09
|
|
||||||
### Added
|
|
||||||
- **사용자 알람 근무표 연동**: 기타를 제외한 사용자 알람이 나의 근무표와 연동 (예: 주간 선택 시 주간 날에만 울림)
|
|
||||||
- **달력 팀 표시 개선**: 다이얼로그에서 나의 반 표시 시 "(나)" 추가
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- **알람 표시 개선**: (사용자) 텍스트 제거, 색상으로 구분
|
|
||||||
- **여러 알람 표시**: 3개 이하면 모두 표시, 초과 시 "XX:XX 외 N개" 형식
|
|
||||||
- **설정 섹션 타이틀 강화**: 글자 크기 16sp로 확대, 굵게 표시
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.3.6] - 2026-02-09
|
|
||||||
### Added
|
|
||||||
- **사용자 알람 실제 작동**: 사용자 알람이 실제로 울리도록 알람 스케줄링 구현
|
|
||||||
- **알람 수정 기능**: 사용자 알람에 수정 버튼 추가
|
|
||||||
- **달력 알람 표시 개선**: 사용자 알람이 근무 알람보다 빠르면 함께 표시
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- **알람 신뢰성 강화**: 알람 추가 시 즉시 스케줄링되도록 개선
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- **근무별 알람시간 레이블 굵게 표시**: 주간/석간/야간/야맞 레이블을 굵게 표시
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.3.5] - 2026-02-09
|
|
||||||
### Added
|
|
||||||
- **사용자 알람 추가**: 알람 설정에서 '+ 알람 추가' 버튼으로 사용자 정의 알람 등록 가능
|
|
||||||
- **시간 및 근무 유형 선택**: 사용자 알람 추가 시 시간과 근무 유형(주간/석간/야간/기타) 설정
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- **공지사항 버전 표시 수정**: 업데이트 내역에서 버전명이 정확하게 파싱되도록 로직 전면 개선
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.3.4] - 2026-02-09
|
|
||||||
### Improved
|
|
||||||
- **공지사항 버전 파싱 개선**: 업데이트 내역 상단에 버전명이 더 정확하게 표시되도록 로직 보강
|
|
||||||
- **사용 설명서 버전 자동화**: 설명서 상단의 앱 버전이 하드코딩 대신 현재 설치된 버전으로 자동 표시
|
|
||||||
- **날짜 숫자 크기 확대**: 달력 날짜 숫자를 더 크게(12sp) 키워 가독성 향상
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.3.3] - 2026-02-09
|
|
||||||
### Fixed
|
|
||||||
- **달력 스와이프 감도 개선**: RecyclerView 터치 간섭 문제를 해결하기 위해 `addOnItemTouchListener` 적용
|
|
||||||
- **스와이프 영역 확대**: 달력 내부뿐만 아니라 달력 컨테이너 전체에서 스와이프 제스처가 작동하도록 개선
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.3.2] - 2026-02-08
|
|
||||||
### Fixed
|
|
||||||
- **업데이트 내역 버전 파싱 수정**: 버전 번호가 정확하게 표시되도록 정규표현식 파싱 적용
|
|
||||||
- **근무 변경 팝업 불투명도 향상**: 배경 글자가 비치지 않도록 95% 불투명도 적용
|
|
||||||
- **공휴일/음력 표시 개선**: 카드 중앙에 크게 표시, 생략(...)없이 전체 표시
|
|
||||||
- **설명서 불필요한 내용 제거**: 알람 프라이버시 설명 삭제 (본인 폰에만 설정되므로 불필요)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.3.1] - 2026-02-08
|
|
||||||
### Improved
|
|
||||||
- **용어 통일**: '조' 표기를 '반'으로 전체 통일 (다른 반 근무, 설명서, 메뉴 등)
|
|
||||||
- **업데이트 내역 버전 표기**: 공지사항에 'v0.3.1 업데이트 내용' 형식으로 버전 표시
|
|
||||||
- **공휴일 글자 크게 표시**: 공휴일/음력 날짜 텍스트를 13sp 굵은 글씨로 표시
|
|
||||||
- **사용 설명서 최신화**: v0.3.1 기준 최신 기능 및 용어 반영
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.3.0] - 2026-02-08
|
|
||||||
### Improved
|
|
||||||
- **공휴일 체크 위치 고정**: 다른 조 달력 조회 시에도 공휴일 체크박스가 우측에 고정
|
|
||||||
- **음력 날짜 표시 개선**: 12.25 형식의 음력 날짜가 생략 없이 전체 표시
|
|
||||||
- **설명서 UI 통일**: 공지사항과 동일한 핑크 카드 스타일로 변경
|
|
||||||
- **공지사항 UI 업그레이드**: 메시 그라디언트 배경과 세련된 헤더 카드 적용
|
|
||||||
- **전체 UI/UX 통일감 강화**: 앱 전반에 걸쳐 일관된 디자인 언어 적용
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.2.9] - 2026-02-08
|
|
||||||
### Improved
|
|
||||||
- **공휴일 글자 크게 표시**: 공휴일 명칭도 근무 글자와 동일하게 크게 (14sp) 표시
|
|
||||||
- **다시 울림 옵션 추가**: 1분, 3분 스누즈 간격 추가 (총 8개 옵션)
|
|
||||||
- **알람 표시 개선**: 다른 조 달력 조회 시 알람 영역 완전히 숨김 처리
|
|
||||||
- **공지사항 표시 제한**: 최대 7개 항목만 표시하여 가독성 향상
|
|
||||||
- **사용 설명서 최신화**: v0.2.9 기준 모든 기능 반영
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.2.8] - 2026-02-08
|
|
||||||
### Improved
|
|
||||||
- **달력 근무 텍스트 대폭 확대**: 주간, 석간, 야간 등 근무 글자를 16sp로 키워 가독성 극대화
|
|
||||||
- **기본 달력 모드 변경**: 앱 실행 시 '교대달력'이 기본으로 표시 (공휴일 체크 해제 상태)
|
|
||||||
- **달력 레이아웃 균등 배분**: 날짜, 근무, 음력이 균등하게 배치되어 깔끔한 정렬
|
|
||||||
- **알람 표시 개선**: 다른 조 달력 조회 시 알람 시간이 표시되지 않음 (내 조만 알람 표시)
|
|
||||||
- **오늘 날짜 강조**: 오늘 날짜에 파란색 테두리로 눈에 띄게 표시
|
|
||||||
- **사용 설명서 UI 전면 개편**: Glassmorphism 3.0 디자인 적용, 앱 아이콘 헤더, 글래스 카드 스타일
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.2.7] - 2026-02-08
|
|
||||||
### Fixed
|
|
||||||
- **체크 표시 로직 수정**: 근무 중인 날에는 V 체크 표시가 나타나지 않도록 수정 (휴무/휴가일에만 표시)
|
|
||||||
- **사용 설명서 업데이트**: 최신 앱 기능(글래스모피즘 3.0, 탭 설정, 오늘 이동 등) 반영 및 갱신
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.2.6] - 2026-02-08
|
|
||||||
### Added
|
|
||||||
- **공휴일 모드**: '공휴일' 체크 시 근무 표시를 숨기고 공휴일 명칭만 표시 (일반 달력 모드)
|
|
||||||
- **근무 변경 팝업 디자인**: 근무 변경 화면에 Glassmorphism 3.0 디자인 적용
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.2.5] - 2026-02-08
|
|
||||||
### Fixed
|
|
||||||
- **용어 수정**: '근무표 직접 수정' 버튼 명칭을 **'사용 설명서'**로 정정 (기능과 명칭 불일치 해결)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.2.4] - 2026-02-08
|
|
||||||
### Fixed
|
|
||||||
- **다크 모드 가독성 개선**: 닫기 버튼 및 달력 날짜 텍스트 가독성 향상
|
|
||||||
- **UI/UX 개선**: 달력에 오늘 날짜로 이동하는 버튼 추가
|
|
||||||
- **디자인 수정**: 공휴일 체크 방식 변경 (V 체크 표시) 및 글래스모피즘 효과 강화
|
|
||||||
- **용어 수정**: '직접 입력 관리' → '근무표 직접 수정'으로 변경하여 이해도 향상
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.2.3] - 2026-02-08
|
|
||||||
### Changed
|
|
||||||
- **디자인 업그레이드 (Glassmorphism 3.0)**: 더욱 아름답고 세련된 반투명 디자인 적용
|
|
||||||
- **설정 화면 개편**: 기본 설정과 알람 설정 탭으로 분리하여 사용성 강화
|
|
||||||
- **완전 한글화**: 달력 요일 및 설정 메뉴 100% 한글 적용
|
|
||||||
- **회사 명칭 간소화**: '모나리자 전주' → '전주', '모나리자 논산' → '논산'으로 변경
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- **알람 시간 초기화**: 회사 변경 시 해당 회사의 기본 출근 시간으로 자동 변경
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.2.2] - 2026-02-08
|
|
||||||
### Added
|
|
||||||
- **다크/라이트 모드 지원**: 설정 > 화면 테마에서 시스템/다크/라이트 모드 선택 가능
|
|
||||||
- **업데이트 내역 실시간 동기화**: 앱 내 변경사항이 서버와 즉시 연동되도록 개선
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- **용어 수정**: '공장' → '회사', '스누즈' → '다시 울림'으로 변경하여 친숙함 강화
|
|
||||||
- **UI 개선**: 알람 화면 '미루기' 버튼 가독성 향상 및 텍스트 수정
|
|
||||||
- **설정 화면**: 하단에 앱 버전 정보 및 제작자(산적이얌) 표시 추가
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.2.1] - 2026-02-08
|
|
||||||
### Changed (UI Overhaul - Glassmorphism 2.0)
|
|
||||||
- **전체 디자인 리뉴얼**: 고급스러운 메쉬 그라데이션(Deep Purple-Blue) 배경 적용
|
|
||||||
- **설정 화면 개선**: 알람 시간 버튼 색상을 투명한 글래스 스타일로 변경하여 가독성 대폭 향상
|
|
||||||
- **메인 캘린더**: 투명 카드 UI 적용, 텍스트 색상을 배경에 맞춰 화이트 톤으로 최적화
|
|
||||||
- **알람 화면**: 슬라이더 및 시간 표시 가독성 개선, 부드러운 글래스 패널 적용
|
|
||||||
- **세부 디테일**: 섹션 타이틀 영문 표기, 아이콘 및 버튼 스타일 통일
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.2.0] - 2026-02-08
|
|
||||||
### Changed
|
|
||||||
- **스누즈 메시지 개선**: "스누즈 설정됨" → "X분 뒤 다시 울림" 형태로 설정된 시간 표시
|
|
||||||
- **알람 화면 글래스모피즘 적용**: 반투명 카드, 슬라이더, 썸네일에 부드러운 투명도 효과
|
|
||||||
- **알람 화면 배경 개선**: 다크 블루 그라데이션 팔레트로 세련됨 향상
|
|
||||||
- **설정 화면 버튼 개선**: 진한 색상을 부드러운 글래스모피즘 스타일로 변경
|
|
||||||
- **스누즈 슬라이더에 시간 표시**: 알람 화면에서 설정된 스누즈 시간을 바로 확인 가능
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.1.9] - 2026-02-08
|
|
||||||
### Changed
|
|
||||||
- 알람 화면: 알람 끄기(빨간색)를 위로, 스누즈(파란색)를 아래로 위치 변경
|
|
||||||
- 설정 화면: 글래스모피즘 디자인 적용 (반투명 카드, 부드러운 그라데이션 배경)
|
|
||||||
- 설정 화면: 이모지 대신 안드로이드 시스템 아이콘으로 대체하여 세련됨 향상
|
|
||||||
- 사용설명서: 한글 깨짐 수정 및 알람 해제 방법 내용 추가
|
|
||||||
- 변경사항: 불필요한 구분선 및 빈 불릿 필터링으로 가독성 개선
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.1.8] - 2026-02-08
|
|
||||||
### Changed
|
|
||||||
- **설정 화면 전면 개편**: 섹션별 카드 분리, 구분선 및 여백 적용으로 가독성 대폭 개선
|
|
||||||
- **알람 화면 UI 고도화**:
|
|
||||||
- 그라데이션 배경 및 대형 시간 표시로 프리미엄 느낌 강화
|
|
||||||
- 스누즈(블루) / 해제(레드) 슬라이더 색상 분리로 직관성 향상
|
|
||||||
- 슬라이더 핸들 디자인 고급화 (원형 + 중심 컬러)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.1.7] - 2026-02-08
|
|
||||||
### Added
|
|
||||||
- **슬라이더 방식 알람 UI**: 아이폰/갤럭시 스타일의 '밀어서 해제/스누즈' UI 도입
|
|
||||||
- **스누즈 (좌→우)**: 상단 슬라이더를 밀어서 잠시 미룸
|
|
||||||
- **알람 해제 (우→좌)**: 하단 슬라이더를 밀어서 정지
|
|
||||||
- **디자인 고도화**: 시각적인 조작 가이드(트랙 및 핸들)를 적용하여 직관성 및 미관 대폭 개선
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.1.6] - 2026-02-08
|
|
||||||
### Fixed
|
|
||||||
- 알람 화면 긴급 수정: 버튼 대신 **스와이프 전용 레이아웃** 도입 (우→좌: 정지, 좌→우: 스누즈)
|
|
||||||
- 화면 켜짐 보장: 잠금 화면에서도 알람 시 즉시 화면이 켜지도록 로직 강화
|
|
||||||
- 논산 야맞 알람 오류: 출근 시간(20:00) 1시간 전인 **19:00**에 알람이 기본 설정되도록 수정
|
|
||||||
- 축약어 적용: '다른 조 오늘 근무' 섹션에서도 '야간 맞교대' 대신 **'야맞'**으로 통일
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- 알람 화면에 현재 시간 표시 및 스와이프 안내 가이드 추가
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.1.5] - 2026-02-08
|
|
||||||
### Added
|
|
||||||
- 알람 스와이프 제스처 기능: **우→좌(알람 정지)**, **좌→우(스누즈)**
|
|
||||||
- 알람 시 화면 자동 켜짐 및 잠금화면 표시 기능 강화
|
|
||||||
- 변경사항(Notice) 화면에 '닫기' 버튼 추가
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- 논산 공장 야간 맞교대(야맞) 기본 시간을 **20:00**으로 조정 및 라벨 업데이트
|
|
||||||
- 달력 내 '야간 맞교대' 표기를 **'야맞'**으로 축약하여 가독성 개선
|
|
||||||
- 5행 달력의 스크롤을 완전히 고정하여 불필요한 움직임 제거
|
|
||||||
- 달력 제목 형식을 연.월(예: 2026.02)로 변경하여 더 깔끔하게 개선
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- 스누즈 버튼 클릭 시 알람이 즉시 다시 울리던 현상 수정
|
|
||||||
- 알람 정지 시 상단 바 알림이 사라지지 않던 문제 해결
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.1.4] - 2026-02-08
|
|
||||||
### Added
|
|
||||||
- 고급스러운 디자인 시스템 적용 (카드 곡률, 현대적 컬러 팔레트)
|
|
||||||
- 알람 테스트 기능 구현 (설정 > 5초 후 테스트 알람)
|
|
||||||
- 사용설명서 앱 내 뷰어 연동 및 최신 내용 반영
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- 달력 줄 수(5행/6행)에 따른 상하 스크롤 자동 제어
|
|
||||||
- 체인지로그 표시 시 불필요한 마크다운 기호를 제거하여 가독성 향상
|
|
||||||
- 설정 화면의 '깃허브 다운로드' 버튼 제거 (앱 내 업데이트로 통일)
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- 음력 날짜가 표시되지 않거나 부정확하던 문제 수정
|
|
||||||
- 메인 화면 상단 알람 정보의 실시간 반영 로직 개선
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.1.3] - 2026-02-08
|
|
||||||
### Added
|
|
||||||
- 설정 내 '변경사항' 메뉴가 실제 CHANGELOG 내용을 표시하도록 연동
|
|
||||||
- '직접 입력' 근무 설정 시 알람 시간을 즉시 입력받도록 개선
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- '오늘 다른 조' 표시를 모든 팀(전주 4개, 논산 3개)이 보이도록 복원
|
|
||||||
- 일별 근무 변경 시 표준 근무(주간/석간/야간/야맞)는 설정된 시간을 즉시 적용하도록 간소화
|
|
||||||
- 야간 맞교대(야맞) 알람 기본 시간을 공장별로 차별화 (논산: 19:00, 전주: 18:00)
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- 야간 맞교대 시간 설정이 저장되지 않던 문제 수정
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.1.2] - 2026-02-08
|
|
||||||
### Added
|
|
||||||
- 앱 내 직접 APK 다운로드 및 설치 기능 (진행률 표시 포함)
|
|
||||||
- 스와이프 제스처로 캘린더 월 탐색 기능
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- '오늘 다른 조' 표시를 현재 보고 있는 팀 제외한 팀만 표시하도록 간소화
|
|
||||||
- 캘린더 높이를 항상 6줄(42칸)로 고정하여 일관된 UI 제공
|
|
||||||
- 업데이트 다운로드 방식을 웹페이지 이동에서 앱 내 직접 다운로드로 변경
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- 팀 표시에서 지역명(전주/논산) 제거하여 UI 정리
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.1.1] - 2026-02-08
|
|
||||||
### Changed
|
|
||||||
- 릴리즈 저장소 분리 (dakjaba-releases)
|
|
||||||
- 버전 체크 URL 업데이트
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.1.0] - 2026-02-08
|
|
||||||
### Added
|
|
||||||
- 사용설명서(Manual) 메뉴 추가
|
|
||||||
- 설정 화면 내 수동 업데이트 메뉴 개선
|
|
||||||
- 달력 내 음력 표시 기능 추가
|
|
||||||
- 릴리즈 빌드 서명(Signing) 적용
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- 알람 설정 단위를 1분으로 세분화
|
|
||||||
- 반 선택 방식을 라디오 버튼에서 드롭다운(Spinner)으로 변경
|
|
||||||
- 전주 D반 복구 및 공장별 맞춤형 반 선택 로직 적용
|
|
||||||
- 하단 '오늘의 근무' 레이아웃 최적화
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- 설정 변경 시 달력에 즉시 반영되지 않던 문제 수정
|
|
||||||
- 공휴일 텍스트 잘림 현상 개선
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [2026-02-01]
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- 기본 알람 스케줄 엔진
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- Doze 모드에서 알람 누락 문제 수정
|
|
||||||
|
|||||||
@@ -1,69 +1,62 @@
|
|||||||
# 교대링(Shiftring) 상세 사용 가이드
|
# 교대링(ShiftRing) 완벽 활용 가이드
|
||||||
|
|
||||||
본 가이드는 **교대링**의 주요 기능과 설정을 안내합니다. 별도의 복잡한 설정 없이도 **자신의 반(A/B/C/D)**만 선택하면 즉시 모든 일정과 알람이 세팅됩니다.
|
교대링은 복잡한 설정 없이 자신의 근무 반만 선택하면 365일 교대근무 일정과 스마트 알람이 자동으로 세팅되는 프리미엄 교대근무 캘린더입니다.
|
||||||
|
|
||||||
## 1. 스마트 달력 사용법
|
|
||||||
- **일정 한눈에 보기**: 달력에 주간(레몬), 석간(연두), 야간(보라), 휴무(빨강) 등 색상별로 근무가 자동 표시됩니다.
|
|
||||||
- **월 이동 제스처**: 화면을 좌우로 가볍게 밀어서(스와이프) 이전 달이나 다음 달로 부드럽게 이동할 수 있습니다.
|
|
||||||
- **빠른 년/월 이동**: 상단 중앙의 **'2026년 02월'** 텍스트를 터치하면 휠 다이얼을 돌려 원하는 년도와 월로 즉시 이동할 수 있습니다.
|
|
||||||
- **오늘로 돌아오기**: 상단의 **'오늘'** 버튼을 누르면 언제 어디서든 현재 날짜로 즉시 돌아옵니다.
|
|
||||||
- **타 반 근무 확인**: 하단의 반 버튼(A반/B반/C반/D반)을 터치하면 해당 반의 달력 뷰로 전환됩니다.
|
|
||||||
|
|
||||||
## 2. 근무 변경 및 개인 메모
|
|
||||||
기본 스케줄 외의 변경 사항을 달력에 직접 기록하고 관리할 수 있습니다.
|
|
||||||
- **날짜 선택**: 수정하고 싶은 날짜를 터치하면 상세 설정 팝업이 나타납니다.
|
|
||||||
- **근무 상태 수정**: 연차, 교육, 월차, 반월, 반년, 휴무 등 해당일의 상태를 선택하세요. 달력에 즉시 반영되며 관련 알람도 자동 조정됩니다.
|
|
||||||
- **메모 기능**: 팝업 하단 메모란에 내용을 입력하면 달력 날짜 아래에 메모 내용이 표시됩니다.
|
|
||||||
- **설정 초기화**: 수정한 일정을 원래의 기본 순번대로 되돌리려면 **'원래대로'** 버튼을 누르세요.
|
|
||||||
|
|
||||||
## 3. 프리미엄 알람 시스템
|
|
||||||
최신 트렌드를 반영한 아름답고 신뢰할 수 있는 알람 기능을 제공합니다. 교대링은 **3단계 안전장치**를 통해 100% 신뢰도를 지향합니다.
|
|
||||||
- **자동 예약**: 선택된 근무(주/야/석)에 따라 알람 시간이 자동으로 계산되어 예약됩니다. (향후 30일치 사전 예약)
|
|
||||||
- **정밀 알람 엔진**: `AlarmClock` API를 통해 절전 모드에서도 정확하게 작동하며, 상단바에 알람 아이콘이 표시되어 작동 여부를 쉽게 확인할 수 있습니다.
|
|
||||||
- **실시간 동기화**: 근무를 변경하거나 설정에서 알람 시간을 바꾸는 즉시 전체 스케줄이 실시간으로 재구성됩니다.
|
|
||||||
- **시간 커스텀**: 설정(⚙️) → **알람 설정** 탭에서 각 근무별 기본 알람 시간을 본인의 기상 패턴에 맞게 수정할 수 있습니다.
|
|
||||||
- **전체 알람 마스터 스위치**: 알람 설정 페이지 좌측 상단의 **'전체 알람 켜짐/꺼짐'** 버튼으로 모든 예약을 일시 정지하거나 활성화할 수 있습니다.
|
|
||||||
- **럭셔리 디자인**: **글래스모피즘(유리 질감)**과 화려한 그라데이션이 적용된 알람 화면은 가독성과 디자인을 모두 잡았습니다.
|
|
||||||
- **직관적인 버튼 제어**:
|
|
||||||
- **다시 울림**: 상단 유리 질감 버튼을 누르면 설정된 간격만큼 알람을 미룹니다.
|
|
||||||
- **해제**: 중앙의 거대한 원형 버튼을 누르면 알람이 즉시 종료됩니다. (주변에 은은한 오로라 광채 애니메이션이 작동합니다)
|
|
||||||
- **부드러운 스위치**: 알람 항목의 온/오프 스위치는 가볍고 부드러운 애니메이션을 제공합니다.
|
|
||||||
|
|
||||||
## 4. 근무 관리 (연차 및 연장근무)
|
|
||||||
**근무 관리** 탭에서 연차와 연장근무를 한눈에 관리할 수 있습니다.
|
|
||||||
|
|
||||||
### 연차 설정
|
|
||||||
- **총 연차 설정**: 1~25일 중 본인의 총 연차 일수를 선택하세요. 선택 즉시 저장됩니다.
|
|
||||||
- **남은 연차 자동 계산**: 달력에서 연차/반년으로 설정한 날짜를 자동으로 인식하여 실시간으로 남은 연차를 계산합니다.
|
|
||||||
- 연차: -1일 차감
|
|
||||||
- 반년(반차): -0.5일 차감
|
|
||||||
|
|
||||||
### 연장근무 계산
|
|
||||||
- **자동 집계**: 달력에서 근무(주간/석간/야간 등)로 설정한 날짜를 자동으로 카운트합니다.
|
|
||||||
- **시간 계산**: 근무 1일당 2시간으로 계산하여 총 연장근무 시간을 표시합니다.
|
|
||||||
- **예시**: 3일 근무 → 6시간 연장근무
|
|
||||||
|
|
||||||
## 5. 물때표 및 특수 설정
|
|
||||||
- **물때표 표시**: 설정 → 부가 기능에서 **'물때 정보 표시'**를 활성화하면 달력 각 날짜에 물때 정보가 나타납니다.
|
|
||||||
- **지역 전환**: 달력 상단의 지역 이름(군산, 변산, 여수, 태안)을 터치하여 간편하게 지역별 물때를 확인할 수 있습니다.
|
|
||||||
- **기본 공장 설정**: 설정 → 기본 설정에서 본인이 속한 공장(전주 또는 논산)을 선택하여 공장별 특화된 교대 로직을 적용받으세요.
|
|
||||||
|
|
||||||
## 6. 데이터 백업 및 복구
|
|
||||||
- **안전한 백업**: 설정 → 부가 기능에서 **'백업하기'** 버튼으로 현재의 근무 기록과 메모를 JSON 파일로 저장할 수 있습니다.
|
|
||||||
- **간편한 복구**: **'복구하기'** 버튼으로 백업 파일을 불러와 이전 상태를 복원할 수 있습니다.
|
|
||||||
- **백업 범위**: 근무 변경 내역, 메모, 환경 설정이 저장됩니다.
|
|
||||||
|
|
||||||
## 7. 앱 공유 및 초기화
|
|
||||||
- **앱 공유하기**: 설정 → 부가 기능에서 **'교대링 앱 친구에게 공유하기'**를 통해 동료들에게 설치 파일(APK)을 직접 별 수 있습니다.
|
|
||||||
- **데이터 초기화**: 설정 → 부가 기능 하단의 **'개별 근무/알람 설정 전체 삭제'**로 달력에서 개별적으로 바꾼 모든 설정을 초기화할 수 있습니다.
|
|
||||||
|
|
||||||
## 8. 화면 테마 설정
|
|
||||||
- **테마 선택**: 설정 → 부가 기능에서 **'화면 테마 설정'**을 통해 시스템 기본/라이트 모드/다크 모드 중 선택할 수 있습니다.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
알람이 누락되지 않도록 앱 실행 시 안내되는 **통합 권한 설정**을 반드시 완료해주세요:
|
## 1. 스마트 달력 (Samsung One UI)
|
||||||
1. 배터리 사용량을 **'제한 없음'**으로 설정 (배터리 최적화 제외)
|
- 일정 한눈에 보기: 달력 각 날짜에 <font color='#F39C12'><b>주간(노랑)</b></font>, <font color='#00897B'><b>석간(청록)</b></font>, <font color='#2C3E50'><b>야간(다크)</b></font>, <font color='#E74C3C'><b>휴무(빨강)</b></font> 등 근무 형태별 고유 색상 뱃지와 텍스트가 표시됩니다.
|
||||||
2. **'정확한 알람 및 리마인더'** 권한 허용 (필수)
|
- 부드러운 월 이동: 화면을 좌우로 가볍게 밀어서(스와이프) 끊김이나 깜빡임 없이 부드러운 카드 슬라이드 애니메이션으로 월간 이동이 가능합니다.
|
||||||
3. **'전체화면 알림'** 권한 허용 (잠금 화면 즉시 표시)
|
- 빠른 년/월 이동: 상단 중앙의 년/월 텍스트를 터치하면 휠 다이얼로 2010년~2050년까지 원하는 년도와 월로 즉시 이동할 수 있습니다.
|
||||||
4. 알람 볼륨 및 진동 설정 확인
|
- 오늘로 돌아오기: 우측 상단의 '오늘' 버튼을 누르면 언제 어디서든 현재 날짜로 즉시 복귀합니다.
|
||||||
|
- 오늘의 근무 상태: 달력 상단에 오늘 날짜의 근무 형태가 큼직한 폰트와 고유 색상으로 시원하게 표시됩니다.
|
||||||
|
- 다른 반 근무 조회: 하단의 A반 / B반 / C반 / D반 버튼을 터치하여 동료들의 근무 일정을 간편하게 비교 확인할 수 있습니다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. 근무 변경 및 4줄 하루 메모
|
||||||
|
- 근무 형태 개별 변경: 달력에서 원하는 날짜를 터치하면 13종 근무 버튼(주, 석, 야, 주맞, 야맞, 휴, 월차, 연차, 반월, 반년, 교육, 초기, 직접)을 통해 즉시 변경할 수 있습니다.
|
||||||
|
- 상단 즉시 저장: 하루 메모 입력창 상단에 위치한 파란색 체크(저장) 아이콘을 누르면 키보드가 뜬 상태에서도 즉시 저장됩니다.
|
||||||
|
- 자동 저장 (Auto-Save): 메모 작성 중 뒤로가기(Back) 버튼을 누르거나 팝업 바깥을 터치하여 닫아도 작성 중인 내용이 100% 자동 저장됩니다.
|
||||||
|
- 최대 4줄 확장 메모: 하루 메모가 있는 날짜는 근무 뱃지가 날짜 옆으로 콤팩트하게 이동하며, 최대 4줄까지의 메모 본문이 달력 칸 안에 또렷하게 노출됩니다.
|
||||||
|
- 메모 삭제: 메모 상단의 빨간색 휴지통 아이콘을 누르면 메모만 깔끔하게 삭제할 수 있습니다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. 스마트 알람 시스템
|
||||||
|
- 마스터 전체 알람 스위치: 알람 설정 상단의 '전체 알람' 스위치로 모든 교대근무 알람을 일괄 제어할 수 있습니다. 알람을 끌 때는 오작동 방지를 위한 안전 경고 팝업이 제공됩니다.
|
||||||
|
- 삼성 최신 시계 UI 알람 화면: 알람이 울릴 때 대형 폰트 시간, 스누즈 캡슐 허브, 전방향 스와이프/원터치 해제 버튼 및 은은한 오로라 펄스 애니메이션이 제공됩니다.
|
||||||
|
- 폰 사용 중 전체화면 표시: 스마트폰을 사용 중이거나 잠금 상태에서도 화면 최상단에 실제 전체화면 알람이 즉시 나타납니다.
|
||||||
|
- 30일 사전 자동 예약: 교대 순번에 맞춰 향후 30일간의 알람이 AlarmClock API를 통해 정밀하게 사전 예약됩니다.
|
||||||
|
- 근무별 맞춤 시간 설정: 주간, 석간, 야간, 야간맞교대 및 사용자 정의 알람을 자유롭게 추가/수정할 수 있습니다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. 근무 관리 및 연차/연장근무
|
||||||
|
- 총 부여 연차 설정: 드롭다운에서 1~25일 중 본인의 연차 일수를 선택하면 중앙 정렬된 깔끔한 UI로 관리됩니다.
|
||||||
|
- 잔여 연차 자동 계산: 달력에 등록된 연차(-1일)와 반년/반차(-0.5일) 사용 내역을 실시간으로 추적하여 남은 연차를 자동으로 계산합니다.
|
||||||
|
- 연장근무 자동 집계: 당월 근무 일수에 따른 연장근무 시간을 자동으로 계산하여 표시합니다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. 부가기능 및 맞춤 설정
|
||||||
|
- 실시간 물때표: 부가기능에서 '물때 정보 표시'를 켜면 서해/남해 4개 주요 지역(군산, 변산, 여수, 태안)의 물때 정보가 달력 날짜 아래에 표시됩니다.
|
||||||
|
- 화면 테마 설정: 시스템 기본, 라이트 모드, 다크 모드 중 원하는 테마를 선택할 수 있습니다.
|
||||||
|
- 백업 및 복구: 근무 변경 내역과 메모를 파일로 내보내거나 이전 백업 파일에서 손쉽게 복원할 수 있습니다.
|
||||||
|
- 앱 공유하기: 동료들에게 교대링 앱 설치 파일(APK)을 직접 전송하여 손쉽게 공유할 수 있습니다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. 4단계 정밀 데이터 초기화
|
||||||
|
- 개별 근무/알람 설정 전체 삭제: 달력에서 수정한 모든 근무와 알람 일정을 기본값으로 복원합니다.
|
||||||
|
- 개별 근무 삭제: 달력에서 개별 변경한 교대근무 내역만 기본 순번으로 복원합니다.
|
||||||
|
- 알람 삭제: 추가된 모든 커스텀 알람을 삭제하고 기본 설정으로 복원합니다.
|
||||||
|
- 전체 데이터 초기화 (완전 삭제): 메모, 연차, 개별 근무, 알람을 포함한 모든 앱 데이터를 완전히 초기화합니다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. 앱 안정성 필수 설정 가이드
|
||||||
|
알람이 어떤 상황에서도 누락 없이 100% 정확하게 울리기 위해 아래 권한을 반드시 허용해주세요:
|
||||||
|
1. 배터리 최적화 제외: 배터리 사용량을 '제한 없음'으로 설정합니다.
|
||||||
|
2. 정확한 알람 및 리마인더: 정시 알람 가동을 위한 필수 권한입니다.
|
||||||
|
3. 전체화면 알림 허용: 잠금 화면 및 사용 중 즉시 알람창을 띄우는 핵심 권한입니다. (권한 설정 시 자동으로 앱에 복귀합니다)
|
||||||
|
|||||||
@@ -44,16 +44,6 @@ class AlarmActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
// ForegroundService가 실행 중이면 먼저 중지
|
|
||||||
stopService(Intent(this, AlarmForegroundService::class.java))
|
|
||||||
|
|
||||||
// Service 중지 후 약간의 지연을 두어 AudioFocus가 완전히 해제되도록 함
|
|
||||||
try {
|
|
||||||
Thread.sleep(100)
|
|
||||||
} catch (e: InterruptedException) {
|
|
||||||
// 무시
|
|
||||||
}
|
|
||||||
|
|
||||||
enableEdgeToEdge()
|
enableEdgeToEdge()
|
||||||
binding = ActivityAlarmBinding.inflate(layoutInflater)
|
binding = ActivityAlarmBinding.inflate(layoutInflater)
|
||||||
binding.root.background = ContextCompat.getDrawable(this, R.drawable.bg_alarm_gradient)
|
binding.root.background = ContextCompat.getDrawable(this, R.drawable.bg_alarm_gradient)
|
||||||
@@ -185,50 +175,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 +245,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 +281,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 {
|
||||||
@@ -409,6 +457,10 @@ class AlarmActivity : AppCompatActivity() {
|
|||||||
} catch (e: Exception) {}
|
} catch (e: Exception) {}
|
||||||
vibrator = null
|
vibrator = null
|
||||||
|
|
||||||
|
try {
|
||||||
|
stopService(Intent(this, AlarmForegroundService::class.java))
|
||||||
|
} catch (e: Exception) {}
|
||||||
|
|
||||||
val nm = getSystemService(Context.NOTIFICATION_SERVICE) as android.app.NotificationManager
|
val nm = getSystemService(Context.NOTIFICATION_SERVICE) as android.app.NotificationManager
|
||||||
nm.cancel(1)
|
nm.cancel(1)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,11 +71,29 @@ class AlarmForegroundService : Service() {
|
|||||||
|
|
||||||
// 4. Foreground 시작
|
// 4. Foreground 시작
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { // Android 14+
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { // Android 14+
|
||||||
startForeground(NOTIFICATION_ID, notification, android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE)
|
startForeground(NOTIFICATION_ID, notification, android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK)
|
||||||
} else {
|
} else {
|
||||||
startForeground(NOTIFICATION_ID, notification)
|
startForeground(NOTIFICATION_ID, notification)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 5. 사용 중일 때도 즉시 전체화면 AlarmActivity 화면 띄우기
|
||||||
|
try {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
||||||
|
val options = android.app.ActivityOptions.makeBasic().apply {
|
||||||
|
setPendingIntentBackgroundActivityStartMode(android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED)
|
||||||
|
}
|
||||||
|
fullScreenPendingIntent.send(this, 0, null, null, null, null, options.toBundle())
|
||||||
|
} else {
|
||||||
|
fullScreenPendingIntent.send()
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
try {
|
||||||
|
startActivity(fullScreenIntent)
|
||||||
|
} catch (e2: Exception) {
|
||||||
|
e2.printStackTrace()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return START_NOT_STICKY
|
return START_NOT_STICKY
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,13 +17,60 @@ import androidx.activity.ComponentActivity
|
|||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.core.app.ActivityCompat
|
import androidx.core.app.ActivityCompat
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import kotlinx.coroutines.*
|
||||||
|
|
||||||
object AlarmPermissionUtil {
|
object AlarmPermissionUtil {
|
||||||
|
|
||||||
|
private var monitorJob: Job? = null
|
||||||
|
|
||||||
|
/** 권한 플로우가 진행 중인지 추적하는 플래그 (onResume 루프 방지) */
|
||||||
|
@Volatile
|
||||||
|
var isPermissionFlowActive = false
|
||||||
|
private set
|
||||||
|
|
||||||
|
/** 현재 권한 모달 다이얼로그가 표시 중인지 추적 */
|
||||||
|
@Volatile
|
||||||
|
private var isDialogShowing = false
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 시스템 설정 화면에서 사용자가 권한을 허용했을 때 뒤로가기를 누르지 않아도 앱으로 즉시 자동 복귀시킵니다.
|
||||||
|
*/
|
||||||
|
fun monitorAndAutoReturn(activity: Activity, isGrantedCheck: () -> Boolean) {
|
||||||
|
monitorJob?.cancel()
|
||||||
|
monitorJob = CoroutineScope(Dispatchers.Main).launch {
|
||||||
|
delay(1500) // 설정 화면 전환 시간 충분히 대기 (1.5초)
|
||||||
|
var count = 0
|
||||||
|
while (count < 120 && isActive) { // 최대 60초간 500ms 주기로 체크
|
||||||
|
delay(500)
|
||||||
|
count++
|
||||||
|
if (isGrantedCheck()) {
|
||||||
|
try {
|
||||||
|
val returnIntent = Intent(activity, SettingsActivity::class.java).apply {
|
||||||
|
flags = Intent.FLAG_ACTIVITY_REORDER_TO_FRONT or Intent.FLAG_ACTIVITY_SINGLE_TOP
|
||||||
|
}
|
||||||
|
activity.startActivity(returnIntent)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun cancelAutoReturn() {
|
||||||
|
monitorJob?.cancel()
|
||||||
|
monitorJob = null
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 전체 권한 상태를 확인하고 필요한 경우 통합 안내 다이얼로그를 표시합니다.
|
* 전체 권한 상태를 확인하고 필요한 경우 통합 안내 다이얼로그를 표시합니다.
|
||||||
|
* 권한 플로우가 이미 진행 중이거나 다이얼로그가 표시 중이면 중복 호출을 방지합니다.
|
||||||
*/
|
*/
|
||||||
fun checkAndRequestAllPermissions(activity: ComponentActivity) {
|
fun checkAndRequestAllPermissions(activity: ComponentActivity) {
|
||||||
|
// 이미 권한 플로우 진행 중이면 중복 호출 방지
|
||||||
|
if (isPermissionFlowActive || isDialogShowing) return
|
||||||
|
|
||||||
val missingPermissions = mutableListOf<String>()
|
val missingPermissions = mutableListOf<String>()
|
||||||
|
|
||||||
// 1. 알림 권한 (Android 13+)
|
// 1. 알림 권한 (Android 13+)
|
||||||
@@ -64,6 +111,9 @@ object AlarmPermissionUtil {
|
|||||||
|
|
||||||
private fun showIntegratedPermissionDialog(activity: ComponentActivity, missing: List<String>) {
|
private fun showIntegratedPermissionDialog(activity: ComponentActivity, missing: List<String>) {
|
||||||
if (activity.isFinishing || activity.isDestroyed) return
|
if (activity.isFinishing || activity.isDestroyed) return
|
||||||
|
if (isDialogShowing) return // 이미 모달이 떠있으면 중복 방지
|
||||||
|
|
||||||
|
isDialogShowing = true
|
||||||
|
|
||||||
val message = StringBuilder("안정적인 알람 작동을 위해 아래 권한들이 필요합니다:\n\n")
|
val message = StringBuilder("안정적인 알람 작동을 위해 아래 권한들이 필요합니다:\n\n")
|
||||||
missing.forEach { message.append("- $it\n") }
|
missing.forEach { message.append("- $it\n") }
|
||||||
@@ -74,16 +124,35 @@ object AlarmPermissionUtil {
|
|||||||
.setTitle("권한 설정 안내")
|
.setTitle("권한 설정 안내")
|
||||||
.setMessage(message.toString())
|
.setMessage(message.toString())
|
||||||
.setPositiveButton("확인") { _, _ ->
|
.setPositiveButton("확인") { _, _ ->
|
||||||
|
isDialogShowing = false
|
||||||
|
isPermissionFlowActive = true // 플로우 시작 - onResume 재호출 차단
|
||||||
startPermissionFlow(activity)
|
startPermissionFlow(activity)
|
||||||
}
|
}
|
||||||
.setNegativeButton("나중에", null)
|
.setNegativeButton("나중에") { _, _ ->
|
||||||
|
isDialogShowing = false
|
||||||
|
// "나중에"를 누르면 이번 세션에서는 더 이상 묻지 않음
|
||||||
|
isPermissionFlowActive = true
|
||||||
|
}
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
|
.setOnDismissListener {
|
||||||
|
// 어떤 이유로든 다이얼로그가 닫히면 플래그 해제
|
||||||
|
isDialogShowing = false
|
||||||
|
}
|
||||||
.show()
|
.show()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
isDialogShowing = false
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 권한 플로우 완료 후 플래그 리셋 (앱 재시작이나 설정에서 돌아올 때)
|
||||||
|
*/
|
||||||
|
fun resetPermissionFlowState() {
|
||||||
|
isPermissionFlowActive = false
|
||||||
|
isDialogShowing = false
|
||||||
|
}
|
||||||
|
|
||||||
private fun startPermissionFlow(activity: ComponentActivity) {
|
private fun startPermissionFlow(activity: ComponentActivity) {
|
||||||
// 순차적으로 가장 중요한 것부터 요청
|
// 순차적으로 가장 중요한 것부터 요청
|
||||||
|
|
||||||
@@ -91,7 +160,7 @@ object AlarmPermissionUtil {
|
|||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
if (ContextCompat.checkSelfPermission(activity, Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
|
if (ContextCompat.checkSelfPermission(activity, Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
|
||||||
ActivityCompat.requestPermissions(activity, arrayOf(Manifest.permission.POST_NOTIFICATIONS), 101)
|
ActivityCompat.requestPermissions(activity, arrayOf(Manifest.permission.POST_NOTIFICATIONS), 101)
|
||||||
return // 알림 권한 결과 콜백 이후 다음으로 넘어가도록 유도 (혹은 그냥 연달아 띄움)
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,8 +200,12 @@ object AlarmPermissionUtil {
|
|||||||
}
|
}
|
||||||
activity.startActivity(intent)
|
activity.startActivity(intent)
|
||||||
}
|
}
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 모든 권한이 허용된 경우 플로우 완료
|
||||||
|
isPermissionFlowActive = false
|
||||||
}
|
}
|
||||||
|
|
||||||
fun requestBatteryOptimization(context: Context) {
|
fun requestBatteryOptimization(context: Context) {
|
||||||
@@ -175,7 +248,9 @@ object AlarmPermissionUtil {
|
|||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
val intent = Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION).apply {
|
val intent = Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION).apply {
|
||||||
data = Uri.parse("package:${context.packageName}")
|
data = Uri.parse("package:${context.packageName}")
|
||||||
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
}
|
||||||
|
if (context !is Activity) {
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||||
}
|
}
|
||||||
context.startActivity(intent)
|
context.startActivity(intent)
|
||||||
}
|
}
|
||||||
@@ -186,13 +261,17 @@ object AlarmPermissionUtil {
|
|||||||
try {
|
try {
|
||||||
val intent = Intent("android.settings.MANAGE_APP_USE_FULL_SCREEN_INTENT").apply {
|
val intent = Intent("android.settings.MANAGE_APP_USE_FULL_SCREEN_INTENT").apply {
|
||||||
data = Uri.parse("package:${context.packageName}")
|
data = Uri.parse("package:${context.packageName}")
|
||||||
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
}
|
||||||
|
if (context !is Activity) {
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||||
}
|
}
|
||||||
context.startActivity(intent)
|
context.startActivity(intent)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply {
|
val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply {
|
||||||
data = Uri.parse("package:${context.packageName}")
|
data = Uri.parse("package:${context.packageName}")
|
||||||
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
}
|
||||||
|
if (context !is Activity) {
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||||
}
|
}
|
||||||
context.startActivity(intent)
|
context.startActivity(intent)
|
||||||
}
|
}
|
||||||
@@ -211,7 +290,6 @@ object AlarmPermissionUtil {
|
|||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
val pm = context.getSystemService(Context.POWER_SERVICE) as PowerManager
|
val pm = context.getSystemService(Context.POWER_SERVICE) as PowerManager
|
||||||
allGranted = allGranted && pm.isIgnoringBatteryOptimizations(context.packageName)
|
allGranted = allGranted && pm.isIgnoringBatteryOptimizations(context.packageName)
|
||||||
allGranted = allGranted && Settings.canDrawOverlays(context)
|
|
||||||
}
|
}
|
||||||
if (Build.VERSION.SDK_INT >= 34) {
|
if (Build.VERSION.SDK_INT >= 34) {
|
||||||
val nm = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
val nm = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||||
|
|||||||
@@ -81,32 +81,40 @@ class AlarmReceiver : BroadcastReceiver() {
|
|||||||
|
|
||||||
Log.d(TAG, "ForegroundService 시작 완료")
|
Log.d(TAG, "ForegroundService 시작 완료")
|
||||||
|
|
||||||
// 2. AlarmActivity 직접 실행 (알람 화면 표시)
|
// 2. AlarmActivity 직접 즉시 실행 (사용 중일 때도 전체화면 알람 창 띄우기)
|
||||||
val activityIntent = Intent(context, AlarmActivity::class.java).apply {
|
val activityIntent = Intent(context, AlarmActivity::class.java).apply {
|
||||||
putExtra("EXTRA_SHIFT", intent?.getStringExtra("EXTRA_SHIFT") ?: "근무")
|
putExtra("EXTRA_SHIFT", intent?.getStringExtra("EXTRA_SHIFT") ?: "근무")
|
||||||
putExtra("EXTRA_SOUND", intent?.getStringExtra("EXTRA_SOUND"))
|
putExtra("EXTRA_SOUND", intent?.getStringExtra("EXTRA_SOUND"))
|
||||||
putExtra("EXTRA_SNOOZE", intent?.getIntExtra("EXTRA_SNOOZE", 5) ?: 5)
|
putExtra("EXTRA_SNOOZE", intent?.getIntExtra("EXTRA_SNOOZE", 5) ?: 5)
|
||||||
putExtra("EXTRA_SNOOZE_REPEAT", intent?.getIntExtra("EXTRA_SNOOZE_REPEAT", 3) ?: 3)
|
putExtra("EXTRA_SNOOZE_REPEAT", intent?.getIntExtra("EXTRA_SNOOZE_REPEAT", 3) ?: 3)
|
||||||
// 중요: 새 태스크로 실행 (FLAG_ACTIVITY_NEW_TASK)
|
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_REORDER_TO_FRONT or Intent.FLAG_ACTIVITY_NO_USER_ACTION)
|
||||||
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
|
||||||
// 기존 인스턴스 재사용 및 최상위로 가져오기
|
|
||||||
addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
|
||||||
addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP)
|
|
||||||
// 잠금 화면 위에 표시
|
|
||||||
addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT)
|
|
||||||
// 화면 켜기
|
|
||||||
addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 지연 후 Activity 시작 (ForegroundService가 알림을 먼저 표시하도록)
|
val pendingLaunch = android.app.PendingIntent.getActivity(
|
||||||
android.os.Handler(android.os.Looper.getMainLooper()).postDelayed({
|
context,
|
||||||
|
200,
|
||||||
|
activityIntent,
|
||||||
|
android.app.PendingIntent.FLAG_UPDATE_CURRENT or android.app.PendingIntent.FLAG_IMMUTABLE
|
||||||
|
)
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
||||||
|
val options = android.app.ActivityOptions.makeBasic().apply {
|
||||||
|
setPendingIntentBackgroundActivityStartMode(android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED)
|
||||||
|
}
|
||||||
|
pendingLaunch.send(context, 0, null, null, null, null, options.toBundle())
|
||||||
|
} else {
|
||||||
|
pendingLaunch.send()
|
||||||
|
}
|
||||||
|
Log.d(TAG, "AlarmActivity PendingIntent 전송 완료")
|
||||||
|
} catch (e: Exception) {
|
||||||
try {
|
try {
|
||||||
context.startActivity(activityIntent)
|
context.startActivity(activityIntent)
|
||||||
Log.d(TAG, "AlarmActivity 실행 완료")
|
Log.d(TAG, "AlarmActivity 직접 startActivity 완료")
|
||||||
} catch (e: Exception) {
|
} catch (e2: Exception) {
|
||||||
Log.e(TAG, "AlarmActivity 실행 실패", e)
|
Log.e(TAG, "AlarmActivity 실행 실패", e2)
|
||||||
}
|
}
|
||||||
}, 500)
|
}
|
||||||
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.e(TAG, "알람 실행 실패", e)
|
Log.e(TAG, "알람 실행 실패", e)
|
||||||
|
|||||||
@@ -31,6 +31,16 @@ object AlarmSyncManager {
|
|||||||
// 1. DB에 알람 추가
|
// 1. DB에 알람 추가
|
||||||
val alarmId = repo.addCustomAlarm(alarm)
|
val alarmId = repo.addCustomAlarm(alarm)
|
||||||
Log.d(TAG, "알람 DB 추가 완료: ID=$alarmId")
|
Log.d(TAG, "알람 DB 추가 완료: ID=$alarmId")
|
||||||
|
|
||||||
|
// 시스템 알람 볼륨을 항상 최대치로 강제 설정 (새 알람 추가 시)
|
||||||
|
try {
|
||||||
|
val audioManager = context.getSystemService(Context.AUDIO_SERVICE) as android.media.AudioManager
|
||||||
|
val maxVol = audioManager.getStreamMaxVolume(android.media.AudioManager.STREAM_ALARM)
|
||||||
|
audioManager.setStreamVolume(android.media.AudioManager.STREAM_ALARM, maxVol, 0)
|
||||||
|
Log.d(TAG, "알람 볼륨 최대($maxVol)로 강제 설정 완료")
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Log.w(TAG, "볼륨 자동 보정 실패", e)
|
||||||
|
}
|
||||||
|
|
||||||
// 2. AlarmManager에 예약
|
// 2. AlarmManager에 예약
|
||||||
val today = LocalDate.now(SEOUL_ZONE)
|
val today = LocalDate.now(SEOUL_ZONE)
|
||||||
@@ -53,7 +63,18 @@ object AlarmSyncManager {
|
|||||||
.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (addedAlarm.shiftType == "기타" || addedAlarm.shiftType == shift) {
|
// 교육으로 변경된 경우 원래 근무의 알람이 울리도록 원래 근무 타입을 사용
|
||||||
|
val alarmMatchShift = if (shift == "교육") {
|
||||||
|
val team = context.getSharedPreferences("ShiftAlarmPrefs", Context.MODE_PRIVATE)
|
||||||
|
.getString("selected_team", "A") ?: "A"
|
||||||
|
val factory = context.getSharedPreferences("ShiftAlarmPrefs", Context.MODE_PRIVATE)
|
||||||
|
.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
||||||
|
ShiftCalculator.getShift(targetDate, team, factory)
|
||||||
|
} else {
|
||||||
|
shift
|
||||||
|
}
|
||||||
|
|
||||||
|
if (addedAlarm.shiftType == "기타" || addedAlarm.shiftType == alarmMatchShift) {
|
||||||
scheduleCustomAlarm(
|
scheduleCustomAlarm(
|
||||||
context,
|
context,
|
||||||
targetDate,
|
targetDate,
|
||||||
@@ -107,7 +128,18 @@ object AlarmSyncManager {
|
|||||||
.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (alarm.shiftType == "기타" || alarm.shiftType == shift) {
|
// 교육으로 변경된 경우 원래 근무의 알람이 울리도록 원래 근무 타입을 사용
|
||||||
|
val alarmMatchShift = if (shift == "교육") {
|
||||||
|
val team = context.getSharedPreferences("ShiftAlarmPrefs", Context.MODE_PRIVATE)
|
||||||
|
.getString("selected_team", "A") ?: "A"
|
||||||
|
val factory = context.getSharedPreferences("ShiftAlarmPrefs", Context.MODE_PRIVATE)
|
||||||
|
.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
||||||
|
ShiftCalculator.getShift(targetDate, team, factory)
|
||||||
|
} else {
|
||||||
|
shift
|
||||||
|
}
|
||||||
|
|
||||||
|
if (alarm.shiftType == "기타" || alarm.shiftType == alarmMatchShift) {
|
||||||
scheduleCustomAlarm(
|
scheduleCustomAlarm(
|
||||||
context,
|
context,
|
||||||
targetDate,
|
targetDate,
|
||||||
@@ -238,7 +270,14 @@ object AlarmSyncManager {
|
|||||||
val targetDate = today.plusDays(i.toLong())
|
val targetDate = today.plusDays(i.toLong())
|
||||||
val shift = repo.getShift(targetDate, team, factory)
|
val shift = repo.getShift(targetDate, team, factory)
|
||||||
|
|
||||||
if (alarm.shiftType == "기타" || alarm.shiftType == shift) {
|
// 교육으로 변경된 경우 원래 근무의 알람이 울리도록 원래 근무 타입을 사용
|
||||||
|
val alarmMatchShift = if (shift == "교육") {
|
||||||
|
ShiftCalculator.getShift(targetDate, team, factory)
|
||||||
|
} else {
|
||||||
|
shift
|
||||||
|
}
|
||||||
|
|
||||||
|
if (alarm.shiftType == "기타" || alarm.shiftType == alarmMatchShift) {
|
||||||
scheduleCustomAlarm(
|
scheduleCustomAlarm(
|
||||||
context,
|
context,
|
||||||
targetDate,
|
targetDate,
|
||||||
|
|||||||
@@ -352,11 +352,18 @@ suspend fun syncAllAlarms(context: Context) {
|
|||||||
val targetDate = today.plusDays(i.toLong())
|
val targetDate = today.plusDays(i.toLong())
|
||||||
val shift = repo.getShift(targetDate, team, factory)
|
val shift = repo.getShift(targetDate, team, factory)
|
||||||
|
|
||||||
|
// 교육으로 변경된 경우 원래 근무의 알람이 울리도록 원래 근무 타입을 사용
|
||||||
|
val alarmMatchShift = if (shift == "교육") {
|
||||||
|
ShiftCalculator.getShift(targetDate, team, factory)
|
||||||
|
} else {
|
||||||
|
shift
|
||||||
|
}
|
||||||
|
|
||||||
for (alarm in customAlarms) {
|
for (alarm in customAlarms) {
|
||||||
if (!alarm.isEnabled) continue
|
if (!alarm.isEnabled) continue
|
||||||
|
|
||||||
// 근무 연동 조건 확인
|
// 근무 연동 조건 확인
|
||||||
if (alarm.shiftType == "기타" || alarm.shiftType == shift) {
|
if (alarm.shiftType == "기타" || alarm.shiftType == alarmMatchShift) {
|
||||||
scheduleCustomAlarm(
|
scheduleCustomAlarm(
|
||||||
context,
|
context,
|
||||||
targetDate,
|
targetDate,
|
||||||
|
|||||||
@@ -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) {
|
||||||
// Handle specific "Half" cases first
|
"주간" -> "주"
|
||||||
if (item.shift == "반월" || item.shift == "반년") {
|
"석간" -> "석"
|
||||||
holder.shiftChar.text = if (item.shift == "반월") "월" else "년"
|
"야간" -> "야"
|
||||||
holder.shiftChar.setTextColor(ContextCompat.getColor(context, R.color.black)) // Black for contrast on Half Red/Transparent
|
"주간 맞교대" -> "주맞"
|
||||||
holder.shiftChar.textSize = 18f
|
"야간 맞교대" -> "야맞"
|
||||||
holder.shiftChar.background = ContextCompat.getDrawable(context, R.drawable.bg_shift_half_red)
|
"휴무", "휴가" -> "휴"
|
||||||
} else {
|
"월차" -> "월"
|
||||||
// Standard Logic
|
"연차" -> "연"
|
||||||
val shiftAbbreviation = when (item.shift) {
|
"반월" -> "월"
|
||||||
"주간" -> "주"
|
"반년" -> "년"
|
||||||
"석간" -> "석"
|
"교육" -> "교"
|
||||||
"야간" -> "야"
|
else -> item.shift.take(2)
|
||||||
"주간 맞교대" -> "주맞"
|
}
|
||||||
"야간 맞교대" -> "야맞"
|
|
||||||
"휴무", "휴가" -> "휴"
|
|
||||||
"월차" -> "월"
|
|
||||||
"연차" -> "연"
|
|
||||||
"교육" -> "교"
|
|
||||||
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) {
|
val shiftColorRes = when (item.shift) {
|
||||||
"주간" -> R.color.shift_lemon
|
"주간" -> R.color.shift_lemon
|
||||||
"석간" -> R.color.shift_seok
|
"석간" -> R.color.shift_seok
|
||||||
"야간" -> R.color.shift_ya
|
"야간" -> R.color.shift_ya
|
||||||
"주간 맞교대" -> R.color.shift_jumat
|
"주간 맞교대" -> R.color.shift_jumat
|
||||||
"야간 맞교대" -> R.color.shift_yamat
|
"야간 맞교대" -> R.color.shift_yamat
|
||||||
"휴무", "휴가", "월차", "연차" -> R.color.shift_red
|
"휴무", "휴가", "월차", "연차" -> R.color.shift_red
|
||||||
"교육" -> R.color.primary
|
"반월", "반년" -> R.color.shift_red
|
||||||
else -> R.color.text_secondary
|
"교육" -> R.color.primary
|
||||||
}
|
else -> R.color.text_secondary
|
||||||
val shiftColor = ContextCompat.getColor(context, shiftColorRes)
|
}
|
||||||
|
val shiftColor = ContextCompat.getColor(context, shiftColorRes)
|
||||||
|
|
||||||
if (isToday) {
|
if (hasMemo) {
|
||||||
// Today: Solid Circle
|
// When day has a memo: show small shift badge next to day number, hide large center shift circle
|
||||||
val background = ContextCompat.getDrawable(context, R.drawable.bg_shift_solid_v4) as? android.graphics.drawable.GradientDrawable
|
holder.shiftChar.visibility = View.GONE
|
||||||
background?.setColor(shiftColor)
|
holder.tvShiftSmall.visibility = View.VISIBLE
|
||||||
holder.shiftChar.background = background
|
holder.tvShiftSmall.text = shiftAbbreviation
|
||||||
holder.shiftChar.backgroundTintList = null
|
holder.tvShiftSmall.textSize = if (shiftAbbreviation.length > 1) 7.5f else 9.5f
|
||||||
|
holder.tvShiftSmall.setTypeface(null, android.graphics.Typeface.BOLD)
|
||||||
if (item.shift == "주간" || item.shift == "석간") {
|
|
||||||
holder.shiftChar.setTextColor(ContextCompat.getColor(context, R.color.black))
|
if (item.shift == "반월" || item.shift == "반년") {
|
||||||
} else {
|
holder.tvShiftSmall.text = if (item.shift == "반월") "월" else "년"
|
||||||
holder.shiftChar.setTextColor(Color.WHITE)
|
holder.tvShiftSmall.setTextColor(ContextCompat.getColor(context, R.color.black))
|
||||||
}
|
holder.tvShiftSmall.background = ContextCompat.getDrawable(context, R.drawable.bg_shift_half_red)
|
||||||
|
} else if (isToday) {
|
||||||
|
val smallBg = ContextCompat.getDrawable(context, R.drawable.bg_shift_solid_v4)?.constantState?.newDrawable()?.mutate() as? android.graphics.drawable.GradientDrawable
|
||||||
|
smallBg?.setColor(shiftColor)
|
||||||
|
holder.tvShiftSmall.background = smallBg
|
||||||
|
holder.tvShiftSmall.setTextColor(if (item.shift == "주간" || item.shift == "석간") ContextCompat.getColor(context, R.color.black) else 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)
|
||||||
holder.shiftChar.background = background
|
}
|
||||||
holder.shiftChar.backgroundTintList = null
|
} else {
|
||||||
|
// When day has NO memo: standard large centered shift circle
|
||||||
holder.shiftChar.setTextColor(shiftColor)
|
holder.shiftChar.visibility = View.VISIBLE
|
||||||
|
holder.tvShiftSmall.visibility = View.GONE
|
||||||
|
|
||||||
|
if (item.shift == "반월" || item.shift == "반년") {
|
||||||
|
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)
|
||||||
|
|
||||||
|
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 {
|
||||||
|
|||||||
@@ -187,21 +187,19 @@ class FragmentSettingsAdditional : Fragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 1. 개별 근무/알람 설정 전체 삭제
|
||||||
binding.btnResetOverrides.setOnClickListener {
|
binding.btnResetOverrides.setOnClickListener {
|
||||||
androidx.appcompat.app.AlertDialog.Builder(requireContext())
|
androidx.appcompat.app.AlertDialog.Builder(requireContext())
|
||||||
.setTitle("데이터 초기화")
|
.setTitle("개별 근무/알람 설정 전체 삭제")
|
||||||
.setMessage("달력에서 개별적으로 바꾼 모든 근무와 알람 설정이 삭제됩니다. 계속하시겠습니까?")
|
.setMessage("달력에서 개별 변경한 모든 근무와 알람 일정이 삭제되고 기본값으로 복원됩니다. 계속하시겠습니까?")
|
||||||
.setPositiveButton("초기화") { _, _ ->
|
.setPositiveButton("삭제") { _, _ ->
|
||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
try {
|
try {
|
||||||
val db = AppDatabase.getDatabase(requireContext())
|
val db = AppDatabase.getDatabase(requireContext())
|
||||||
val dao = db.shiftDao()
|
val dao = db.shiftDao()
|
||||||
dao.clearOverrides()
|
dao.clearOverrides()
|
||||||
|
|
||||||
// Immediately re-sync all alarms
|
|
||||||
syncAllAlarms(requireContext())
|
syncAllAlarms(requireContext())
|
||||||
|
Toast.makeText(requireContext(), "개별 근무 및 알람 설정이 초기화되었습니다.", Toast.LENGTH_SHORT).show()
|
||||||
Toast.makeText(requireContext(), "모든 개별 설정이 삭제되고 알람이 재설정되었습니다.", Toast.LENGTH_SHORT).show()
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Toast.makeText(requireContext(), "초기화 실패: ${e.message}", Toast.LENGTH_LONG).show()
|
Toast.makeText(requireContext(), "초기화 실패: ${e.message}", Toast.LENGTH_LONG).show()
|
||||||
}
|
}
|
||||||
@@ -210,6 +208,75 @@ class FragmentSettingsAdditional : Fragment() {
|
|||||||
.setNegativeButton("취소", null)
|
.setNegativeButton("취소", null)
|
||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 2. 개별 근무 삭제
|
||||||
|
binding.btnResetShifts.setOnClickListener {
|
||||||
|
androidx.appcompat.app.AlertDialog.Builder(requireContext())
|
||||||
|
.setTitle("개별 근무 삭제")
|
||||||
|
.setMessage("달력에서 개별 변경한 교대근무 일정만 삭제되고 기본 근무표로 복원됩니다. 계속하시겠습니까?")
|
||||||
|
.setPositiveButton("삭제") { _, _ ->
|
||||||
|
lifecycleScope.launch {
|
||||||
|
try {
|
||||||
|
val db = AppDatabase.getDatabase(requireContext())
|
||||||
|
val dao = db.shiftDao()
|
||||||
|
dao.clearOverrides()
|
||||||
|
syncAllAlarms(requireContext())
|
||||||
|
Toast.makeText(requireContext(), "개별 근무 변경 내역이 초기화되었습니다.", Toast.LENGTH_SHORT).show()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Toast.makeText(requireContext(), "초기화 실패: ${e.message}", Toast.LENGTH_LONG).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.setNegativeButton("취소", null)
|
||||||
|
.show()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 알람 삭제
|
||||||
|
binding.btnResetAlarms.setOnClickListener {
|
||||||
|
androidx.appcompat.app.AlertDialog.Builder(requireContext())
|
||||||
|
.setTitle("알람 삭제")
|
||||||
|
.setMessage("등록된 모든 사용자 지정 알람이 삭제되고 기본 알람으로 초기화됩니다. 계속하시겠습니까?")
|
||||||
|
.setPositiveButton("삭제") { _, _ ->
|
||||||
|
lifecycleScope.launch {
|
||||||
|
try {
|
||||||
|
val db = AppDatabase.getDatabase(requireContext())
|
||||||
|
val dao = db.shiftDao()
|
||||||
|
dao.clearCustomAlarms()
|
||||||
|
syncAllAlarms(requireContext())
|
||||||
|
Toast.makeText(requireContext(), "등록된 알람이 모두 삭제되었습니다.", Toast.LENGTH_SHORT).show()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Toast.makeText(requireContext(), "삭제 실패: ${e.message}", Toast.LENGTH_LONG).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.setNegativeButton("취소", null)
|
||||||
|
.show()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. 전체 삭제 (완전 초기화)
|
||||||
|
binding.btnResetAll.setOnClickListener {
|
||||||
|
androidx.appcompat.app.AlertDialog.Builder(requireContext())
|
||||||
|
.setTitle("전체 데이터 초기화")
|
||||||
|
.setMessage("⚠️ 주의: 메모, 연차, 개별 근무, 알람을 포함한 모든 앱 데이터가 완전히 초기화됩니다.\n\n정말 전체 데이터를 초기화하시겠습니까?")
|
||||||
|
.setPositiveButton("전체 초기화") { _, _ ->
|
||||||
|
lifecycleScope.launch {
|
||||||
|
try {
|
||||||
|
val db = AppDatabase.getDatabase(requireContext())
|
||||||
|
val dao = db.shiftDao()
|
||||||
|
dao.clearOverrides()
|
||||||
|
dao.clearMemos()
|
||||||
|
dao.clearCustomAlarms()
|
||||||
|
dao.clearAnnualLeave()
|
||||||
|
syncAllAlarms(requireContext())
|
||||||
|
Toast.makeText(requireContext(), "모든 데이터가 완전히 초기화되었습니다.", Toast.LENGTH_LONG).show()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Toast.makeText(requireContext(), "전체 초기화 실패: ${e.message}", Toast.LENGTH_LONG).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.setNegativeButton("취소", null)
|
||||||
|
.show()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -134,32 +134,72 @@ class FragmentSettingsAlarm : Fragment(), SharedPreferences.OnSharedPreferenceCh
|
|||||||
}
|
}
|
||||||
|
|
||||||
private val soundTitleCache = mutableMapOf<String?, String>()
|
private val soundTitleCache = mutableMapOf<String?, String>()
|
||||||
|
private var isUpdatingMasterSwitch = false
|
||||||
|
|
||||||
private fun updateMasterToggleUI(isEnabled: Boolean) {
|
private fun updateMasterToggleUI(isEnabled: Boolean) {
|
||||||
|
if (_binding == null) return
|
||||||
|
isUpdatingMasterSwitch = true
|
||||||
|
binding.masterSwitch.isChecked = isEnabled
|
||||||
|
isUpdatingMasterSwitch = false
|
||||||
|
|
||||||
if (isEnabled) {
|
if (isEnabled) {
|
||||||
binding.tvMasterStatus.text = "전체 알람 켜짐"
|
binding.tvMasterStatus.text = "전체 알람 켜짐"
|
||||||
binding.tvMasterStatus.setTextColor(ContextCompat.getColor(requireContext(), R.color.primary))
|
binding.tvMasterStatus.setTextColor(ContextCompat.getColor(requireContext(), R.color.text_primary))
|
||||||
binding.tvMasterStatus.backgroundTintList = android.content.res.ColorStateList.valueOf(Color.parseColor("#E3F2FD"))
|
binding.ivMasterBell.imageTintList = android.content.res.ColorStateList.valueOf(ContextCompat.getColor(requireContext(), R.color.primary))
|
||||||
} else {
|
} else {
|
||||||
binding.tvMasterStatus.text = "전체 알람 꺼짐"
|
binding.tvMasterStatus.text = "전체 알람 꺼짐"
|
||||||
binding.tvMasterStatus.setTextColor(ContextCompat.getColor(requireContext(), R.color.shift_red))
|
binding.tvMasterStatus.setTextColor(ContextCompat.getColor(requireContext(), R.color.text_secondary))
|
||||||
binding.tvMasterStatus.backgroundTintList = android.content.res.ColorStateList.valueOf(Color.parseColor("#FFEBEE"))
|
binding.ivMasterBell.imageTintList = android.content.res.ColorStateList.valueOf(ContextCompat.getColor(requireContext(), R.color.text_secondary))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun showMasterAlarmOffConfirmationDialog() {
|
||||||
|
val prefs = requireContext().getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
||||||
|
androidx.appcompat.app.AlertDialog.Builder(requireContext())
|
||||||
|
.setTitle("전체 알람 끄기")
|
||||||
|
.setMessage("전체 알람을 끄시겠습니까?\n모든 교대근무 알람 및 개별 알람이 정시에 울리지 않게 됩니다.")
|
||||||
|
.setPositiveButton("끄기") { _, _ ->
|
||||||
|
prefs.edit().putBoolean("master_alarm_enabled", false).apply()
|
||||||
|
updateMasterToggleUI(false)
|
||||||
|
Toast.makeText(requireContext(), "전체 알람이 꺼졌습니다.", Toast.LENGTH_SHORT).show()
|
||||||
|
lifecycleScope.launch { syncAllAlarms(requireContext()) }
|
||||||
|
}
|
||||||
|
.setNegativeButton("취소") { dialog, _ ->
|
||||||
|
// 스위치 원래대로 ON 복귀
|
||||||
|
isUpdatingMasterSwitch = true
|
||||||
|
binding.masterSwitch.isChecked = true
|
||||||
|
isUpdatingMasterSwitch = false
|
||||||
|
dialog.dismiss()
|
||||||
|
}
|
||||||
|
.setOnCancelListener {
|
||||||
|
// 바깥 터치 시에도 원래대로 ON 복귀
|
||||||
|
isUpdatingMasterSwitch = true
|
||||||
|
binding.masterSwitch.isChecked = true
|
||||||
|
isUpdatingMasterSwitch = false
|
||||||
|
}
|
||||||
|
.show()
|
||||||
|
}
|
||||||
|
|
||||||
private fun setupListeners() {
|
private fun setupListeners() {
|
||||||
val prefs = requireContext().getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
val prefs = requireContext().getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
||||||
|
|
||||||
binding.tvMasterStatus.setOnClickListener {
|
binding.masterAlarmCard.setOnClickListener {
|
||||||
val isEnabled = !ShiftAlarmDefaults.isMasterAlarmEnabled(prefs)
|
binding.masterSwitch.performClick()
|
||||||
prefs.edit().putBoolean("master_alarm_enabled", isEnabled).apply()
|
}
|
||||||
updateMasterToggleUI(isEnabled)
|
|
||||||
|
binding.masterSwitch.setOnCheckedChangeListener { _, isChecked ->
|
||||||
val message = if (isEnabled) "전체 알람이 켜졌습니다." else "전체 알람이 꺼졌습니다."
|
if (isUpdatingMasterSwitch) return@setOnCheckedChangeListener
|
||||||
Toast.makeText(requireContext(), message, Toast.LENGTH_SHORT).show()
|
|
||||||
|
if (isChecked) {
|
||||||
// Resync immediately
|
// 바로 켜기
|
||||||
lifecycleScope.launch { syncAllAlarms(requireContext()) }
|
prefs.edit().putBoolean("master_alarm_enabled", true).apply()
|
||||||
|
updateMasterToggleUI(true)
|
||||||
|
Toast.makeText(requireContext(), "전체 알람이 켜졌습니다.", Toast.LENGTH_SHORT).show()
|
||||||
|
lifecycleScope.launch { syncAllAlarms(requireContext()) }
|
||||||
|
} else {
|
||||||
|
// 끌 때는 모달 확인 팝업
|
||||||
|
showMasterAlarmOffConfirmationDialog()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.btnAddCustomAlarm.setOnClickListener {
|
binding.btnAddCustomAlarm.setOnClickListener {
|
||||||
@@ -476,7 +516,15 @@ class FragmentSettingsAlarm : Fragment(), SharedPreferences.OnSharedPreferenceCh
|
|||||||
Log.w("ShiftAlarm", "soundUri가 비어있어 기본값으로 재설정: $currentDialogSoundUri")
|
Log.w("ShiftAlarm", "soundUri가 비어있어 기본값으로 재설정: $currentDialogSoundUri")
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.d("ShiftAlarm", "알람 ${if (isNew) "생성" else "수정"} - 최종 soundUri: $currentDialogSoundUri")
|
// 알람 다이얼로그 열 때 시스템 알람 스트림 볼륨을 항상 최대치로 강제 설정
|
||||||
|
try {
|
||||||
|
val audioManager = requireContext().getSystemService(Context.AUDIO_SERVICE) as android.media.AudioManager
|
||||||
|
val maxVol = audioManager.getStreamMaxVolume(android.media.AudioManager.STREAM_ALARM)
|
||||||
|
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") {
|
||||||
|
|||||||
@@ -193,6 +193,7 @@ class FragmentSettingsBasic : Fragment() {
|
|||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
AlarmPermissionUtil.cancelAutoReturn()
|
||||||
updatePermissionStatuses()
|
updatePermissionStatuses()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,10 +215,8 @@ class FragmentSettingsBasic : Fragment() {
|
|||||||
binding.dividerExact.visibility = View.GONE
|
binding.dividerExact.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. 다른 앱 위에 표시 (Overlay)
|
// 3. 다른 앱 위에 표시 (Overlay - 레거시)
|
||||||
val isOverlayGranted = AlarmPermissionUtil.getOverlayStatus(context)
|
binding.btnOverlayPermission.visibility = View.GONE
|
||||||
binding.tvOverlayStatus.text = if (isOverlayGranted) "[설정 완료: 화면 우위]" else "필수: 알람창 노출을 위해 허용하세요"
|
|
||||||
binding.tvOverlayStatus.setTextColor(ContextCompat.getColor(context, if (isOverlayGranted) R.color.primary else R.color.shift_red))
|
|
||||||
|
|
||||||
// 4. 전체화면 알림 (Full Screen Intent) - Android 14+
|
// 4. 전체화면 알림 (Full Screen Intent) - Android 14+
|
||||||
if (Build.VERSION.SDK_INT >= 34) {
|
if (Build.VERSION.SDK_INT >= 34) {
|
||||||
@@ -234,31 +233,56 @@ class FragmentSettingsBasic : Fragment() {
|
|||||||
val prefs = requireContext().getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
val prefs = requireContext().getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
||||||
|
|
||||||
binding.btnBatteryOptimize.setOnClickListener {
|
binding.btnBatteryOptimize.setOnClickListener {
|
||||||
AlarmPermissionUtil.requestBatteryOptimization(requireContext())
|
val isAlreadyGranted = AlarmPermissionUtil.getBatteryOptimizationStatus(requireContext())
|
||||||
|
AlarmPermissionUtil.requestBatteryOptimization(requireActivity())
|
||||||
|
if (!isAlreadyGranted) {
|
||||||
|
AlarmPermissionUtil.monitorAndAutoReturn(requireActivity()) {
|
||||||
|
AlarmPermissionUtil.getBatteryOptimizationStatus(requireContext())
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.btnExactAlarm.setOnClickListener {
|
binding.btnExactAlarm.setOnClickListener {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||||
|
val isAlreadyGranted = AlarmPermissionUtil.getExactAlarmStatus(requireContext())
|
||||||
val intent = Intent(Settings.ACTION_REQUEST_SCHEDULE_EXACT_ALARM).apply {
|
val intent = Intent(Settings.ACTION_REQUEST_SCHEDULE_EXACT_ALARM).apply {
|
||||||
data = Uri.parse("package:${requireContext().packageName}")
|
data = Uri.parse("package:${requireContext().packageName}")
|
||||||
}
|
}
|
||||||
startActivity(intent)
|
requireActivity().startActivity(intent)
|
||||||
|
if (!isAlreadyGranted) {
|
||||||
|
AlarmPermissionUtil.monitorAndAutoReturn(requireActivity()) {
|
||||||
|
AlarmPermissionUtil.getExactAlarmStatus(requireContext())
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.btnOverlayPermission.setOnClickListener {
|
binding.btnOverlayPermission.setOnClickListener {
|
||||||
AlarmPermissionUtil.requestOverlayPermission(requireContext())
|
val isAlreadyGranted = AlarmPermissionUtil.getOverlayStatus(requireContext())
|
||||||
|
AlarmPermissionUtil.requestOverlayPermission(requireActivity())
|
||||||
|
if (!isAlreadyGranted) {
|
||||||
|
AlarmPermissionUtil.monitorAndAutoReturn(requireActivity()) {
|
||||||
|
AlarmPermissionUtil.getOverlayStatus(requireContext())
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.btnFullScreenIntent.setOnClickListener {
|
binding.btnFullScreenIntent.setOnClickListener {
|
||||||
AlarmPermissionUtil.requestFullScreenIntentPermission(requireContext())
|
val isAlreadyGranted = AlarmPermissionUtil.getFullScreenIntentStatus(requireContext())
|
||||||
|
AlarmPermissionUtil.requestFullScreenIntentPermission(requireActivity())
|
||||||
|
if (!isAlreadyGranted) {
|
||||||
|
AlarmPermissionUtil.monitorAndAutoReturn(requireActivity()) {
|
||||||
|
AlarmPermissionUtil.getFullScreenIntentStatus(requireContext())
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.btnPermissionSettings.setOnClickListener {
|
binding.btnPermissionSettings.setOnClickListener {
|
||||||
|
// 앱 정보 상세 설정 화면은 일반 열람용이므로 자동 복귀를 걸지 않음
|
||||||
val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply {
|
val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply {
|
||||||
data = Uri.parse("package:${requireContext().packageName}")
|
data = Uri.parse("package:${requireContext().packageName}")
|
||||||
}
|
}
|
||||||
startActivity(intent)
|
requireActivity().startActivity(intent)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.btnCheckUpdate.setOnClickListener {
|
binding.btnCheckUpdate.setOnClickListener {
|
||||||
|
|||||||
@@ -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)
|
||||||
@@ -58,9 +63,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, insets ->
|
ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, insets ->
|
||||||
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||||
val density = resources.displayMetrics.density
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||||
val p = (8 * density).toInt()
|
|
||||||
v.setPadding(systemBars.left + p, systemBars.top + p, systemBars.right + p, systemBars.bottom + p)
|
|
||||||
insets
|
insets
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,7 +71,6 @@ class MainActivity : AppCompatActivity() {
|
|||||||
setupWorker()
|
setupWorker()
|
||||||
setupSwipeGesture()
|
setupSwipeGesture()
|
||||||
AppUpdateManager.checkUpdate(this, silent = true)
|
AppUpdateManager.checkUpdate(this, silent = true)
|
||||||
checkRoot()
|
|
||||||
|
|
||||||
val prefs = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
val prefs = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
||||||
currentViewTeam = prefs.getString(KEY_TEAM, "A") ?: "A"
|
currentViewTeam = prefs.getString(KEY_TEAM, "A") ?: "A"
|
||||||
@@ -196,8 +198,10 @@ class MainActivity : AppCompatActivity() {
|
|||||||
updateTideButtonVisibility()
|
updateTideButtonVisibility()
|
||||||
updateCalendar()
|
updateCalendar()
|
||||||
|
|
||||||
// 일원화된 통합 권한 체크 실행 (신뢰도 100% 보장)
|
// 통합 권한 체크: 권한 플로우가 진행 중이 아닐 때만 실행 (모달 루프 방지)
|
||||||
AlarmPermissionUtil.checkAndRequestAllPermissions(this)
|
if (!AlarmPermissionUtil.isPermissionFlowActive) {
|
||||||
|
AlarmPermissionUtil.checkAndRequestAllPermissions(this)
|
||||||
|
}
|
||||||
|
|
||||||
// 설정 변경 시 즉시 반영을 위한 강제 동기화 (30일 스케줄링)
|
// 설정 변경 시 즉시 반영을 위한 강제 동기화 (30일 스케줄링)
|
||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
@@ -262,98 +266,158 @@ 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) {
|
||||||
binding.calendarGrid.adapter = adapter
|
newAdapter.rowHeight = calcRowHeight
|
||||||
binding.monthTitle.text = currentViewMonth.format(DateTimeFormatter.ofPattern("yyyy년 MM월"))
|
}
|
||||||
|
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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Dynamic row height: exactly 5 rows visible, 6-row months scroll
|
binding.monthTitle.text = targetMonth.format(DateTimeFormatter.ofPattern("yyyy년 MM월"))
|
||||||
|
|
||||||
|
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 {
|
||||||
|
val prefix = "오늘의 근무: "
|
||||||
|
val fullText = "$prefix$shiftForViewingTeam$teamSuffix"
|
||||||
|
val spannable = android.text.SpannableStringBuilder(fullText)
|
||||||
|
|
||||||
|
val shiftColorRes = when (shiftForViewingTeam) {
|
||||||
|
"주간", "주" -> R.color.shift_ju
|
||||||
|
"석간", "석" -> R.color.shift_seok
|
||||||
|
"야간", "야" -> R.color.shift_ya
|
||||||
|
"주간 맞교대" -> R.color.shift_jumat
|
||||||
|
"야간 맞교대" -> R.color.shift_yamat
|
||||||
|
"휴무", "휴가" -> R.color.shift_off
|
||||||
|
"월차", "연차" -> R.color.secondary
|
||||||
|
"반월", "반년" -> R.color.shift_red
|
||||||
|
"교육" -> R.color.primary
|
||||||
|
else -> R.color.text_primary
|
||||||
|
}
|
||||||
|
val shiftColor = androidx.core.content.ContextCompat.getColor(this@MainActivity, shiftColorRes)
|
||||||
|
val startIndex = prefix.length
|
||||||
|
val endIndex = startIndex + shiftForViewingTeam.length
|
||||||
|
|
||||||
|
spannable.setSpan(
|
||||||
|
android.text.style.ForegroundColorSpan(shiftColor),
|
||||||
|
startIndex,
|
||||||
|
endIndex,
|
||||||
|
android.text.Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||||
|
)
|
||||||
|
spannable.setSpan(
|
||||||
|
android.text.style.StyleSpan(android.graphics.Typeface.BOLD),
|
||||||
|
startIndex,
|
||||||
|
endIndex,
|
||||||
|
android.text.Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||||
|
)
|
||||||
|
|
||||||
|
binding.todayStatusText.text = spannable
|
||||||
|
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,
|
||||||
@@ -460,8 +524,18 @@ class MainActivity : AppCompatActivity() {
|
|||||||
val alarmTimes = mutableListOf<String>()
|
val alarmTimes = mutableListOf<String>()
|
||||||
val isOff = shift == "휴무" || shift == "휴가"
|
val isOff = shift == "휴무" || shift == "휴가"
|
||||||
|
|
||||||
|
// 교육으로 변경된 경우 원래 근무의 알람을 표시
|
||||||
|
val prefs = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
||||||
|
val matchShift = if (shift == "교육") {
|
||||||
|
val team = prefs.getString(KEY_TEAM, "A") ?: "A"
|
||||||
|
val factory = prefs.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
||||||
|
ShiftCalculator.getShift(date, team, factory)
|
||||||
|
} else {
|
||||||
|
shift
|
||||||
|
}
|
||||||
|
|
||||||
for (alarm in allAlarms) {
|
for (alarm in allAlarms) {
|
||||||
if (alarm.isEnabled && (alarm.shiftType == "기타" || (!isOff && alarm.shiftType == shift))) {
|
if (alarm.isEnabled && (alarm.shiftType == "기타" || (!isOff && alarm.shiftType == matchShift))) {
|
||||||
if (!alarmTimes.contains(alarm.time)) {
|
if (!alarmTimes.contains(alarm.time)) {
|
||||||
alarmTimes.add(alarm.time)
|
alarmTimes.add(alarm.time)
|
||||||
}
|
}
|
||||||
@@ -595,6 +669,20 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val saveAndCloseMemo = {
|
||||||
|
val content = etMemo.text.toString().trim()
|
||||||
|
lifecycleScope.launch {
|
||||||
|
repo.setMemo(date, content)
|
||||||
|
updateCalendar()
|
||||||
|
}
|
||||||
|
dialog.dismiss()
|
||||||
|
}
|
||||||
|
|
||||||
|
dialogView.findViewById<android.view.View>(R.id.btnQuickSaveMemo).setOnClickListener {
|
||||||
|
saveAndCloseMemo()
|
||||||
|
Toast.makeText(this@MainActivity, "메모가 저장되었습니다.", Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
|
||||||
dialogView.findViewById<android.view.View>(R.id.btnClearMemo).setOnClickListener {
|
dialogView.findViewById<android.view.View>(R.id.btnClearMemo).setOnClickListener {
|
||||||
etMemo.setText("")
|
etMemo.setText("")
|
||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
@@ -605,15 +693,22 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dialogView.findViewById<android.view.View>(R.id.btnClose).setOnClickListener {
|
dialogView.findViewById<android.view.View>(R.id.btnClose).setOnClickListener {
|
||||||
|
saveAndCloseMemo()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Auto-save when dialog is dismissed (e.g., Back key or touching outside)
|
||||||
|
dialog.setOnDismissListener {
|
||||||
|
val content = etMemo.text.toString().trim()
|
||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
val content = etMemo.text.toString().trim()
|
|
||||||
repo.setMemo(date, content)
|
repo.setMemo(date, content)
|
||||||
updateCalendar()
|
updateCalendar()
|
||||||
dialog.dismiss()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog.show()
|
dialog.show()
|
||||||
|
|
||||||
|
// Keyboard adjust resize
|
||||||
|
dialog.window?.setSoftInputMode(android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun handleDaySettingAction(date: LocalDate, selected: String, team: String, factory: String) {
|
private suspend fun handleDaySettingAction(date: LocalDate, selected: String, team: String, factory: String) {
|
||||||
@@ -648,8 +743,15 @@ class MainActivity : AppCompatActivity() {
|
|||||||
syncAllAlarms(this)
|
syncAllAlarms(this)
|
||||||
android.widget.Toast.makeText(this, "${selected}로 설정되었습니다. 알람이 해제됩니다.", android.widget.Toast.LENGTH_SHORT).show()
|
android.widget.Toast.makeText(this, "${selected}로 설정되었습니다. 알람이 해제됩니다.", android.widget.Toast.LENGTH_SHORT).show()
|
||||||
}
|
}
|
||||||
|
"교육" -> {
|
||||||
|
// 교육은 원래 근무 알람을 유지
|
||||||
|
repo.setOverride(date, selected, team, factory)
|
||||||
|
updateCalendar()
|
||||||
|
syncAllAlarms(this)
|
||||||
|
android.widget.Toast.makeText(this, "교육으로 기록되었습니다. 원래 근무 알람이 유지됩니다.", android.widget.Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
else -> {
|
else -> {
|
||||||
// New Types: 월차, 연차, 반월, 반년, 교육 -> Saved as Override with no time
|
// New Types: 월차, 연차, 반월, 반년 -> Saved as Override with no time
|
||||||
repo.setOverride(date, selected, team, factory)
|
repo.setOverride(date, selected, team, factory)
|
||||||
// 연차 계산을 먼저 수행하고 달력 업데이트
|
// 연차 계산을 먼저 수행하고 달력 업데이트
|
||||||
repo.updateRemainingAnnualLeave()
|
repo.updateRemainingAnnualLeave()
|
||||||
@@ -717,52 +819,72 @@ class MainActivity : AppCompatActivity() {
|
|||||||
return java.time.Duration.between(now, midnight).toMillis()
|
return java.time.Duration.between(now, midnight).toMillis()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun checkRoot() {
|
|
||||||
if (RootUtil.isDeviceRooted()) {
|
|
||||||
Toast.makeText(this, "⚠️ 루팅된 기기에서 시각적 오류나 알람 불안정이 발생할 수 있습니다.", Toast.LENGTH_LONG).show()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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 {
|
||||||
|
|||||||
@@ -33,18 +33,21 @@ class ManualActivity : AppCompatActivity() {
|
|||||||
try {
|
try {
|
||||||
val versionName = try {
|
val versionName = try {
|
||||||
packageManager.getPackageInfo(packageName, 0).versionName
|
packageManager.getPackageInfo(packageName, 0).versionName
|
||||||
} catch (e: Exception) { "0.7.1" }
|
} catch (e: Exception) { "1.1.3" }
|
||||||
|
|
||||||
binding.manualVersionText.text = "교대링(Shiftring) v$versionName"
|
binding.manualVersionText.text = "교대링(ShiftRing) v$versionName"
|
||||||
|
|
||||||
val rawContent = assets.open("MANUAL.md").bufferedReader().use { it.readText() }
|
val rawContent = assets.open("MANUAL.md").bufferedReader().use { it.readText() }
|
||||||
|
|
||||||
// Premium Styling logic
|
// Clean Markdown markers and format with One UI Typography
|
||||||
val styledContent = rawContent
|
val styledContent = rawContent
|
||||||
.replace(Regex("^# (.*)", RegexOption.MULTILINE), "<br><big><big><b>$1</b></big></big><br>")
|
.replace(Regex("^# (.*)", RegexOption.MULTILINE), "<big><b>$1</b></big><br>")
|
||||||
.replace(Regex("^## (.*)", RegexOption.MULTILINE), "<br><br><font color='#00897B'><b>$1</b></font><br>")
|
.replace(Regex("^## (.*)", RegexOption.MULTILINE), "<br><br><font color='#007AFF'><big><b>$1</b></big></font><br>")
|
||||||
.replace(Regex("^### (.*)", RegexOption.MULTILINE), "<br><br><b>$1</b><br>")
|
.replace(Regex("^### (.*)", RegexOption.MULTILINE), "<br><b>$1</b><br>")
|
||||||
.replace(Regex("^- (.*)", RegexOption.MULTILINE), " • $1")
|
.replace(Regex("^- (.*?): (.*)", RegexOption.MULTILINE), "• <b>$1</b>: $2")
|
||||||
|
.replace(Regex("^- (.*)", RegexOption.MULTILINE), "• $1")
|
||||||
|
.replace(Regex("^---", RegexOption.MULTILINE), "<br><font color='#CCCCCC'>────────────────────</font><br>")
|
||||||
|
.replace("**", "") // Strip any leftover double asterisks
|
||||||
.replace("\n", "<br>")
|
.replace("\n", "<br>")
|
||||||
|
|
||||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ class NoticeActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun fetchChangelog() {
|
private fun fetchChangelog() {
|
||||||
// GitHub Raw URL with cache busting
|
// Gitea Raw URL with cache busting
|
||||||
val baseUrl = "https://raw.githubusercontent.com/sanjeok77-tech/dakjaba-releases/main/CHANGELOG.md"
|
val baseUrl = "https://git.webpluss.net/sanjeok77/ShiftRing/raw/branch/main/app/src/main/assets/CHANGELOG.md"
|
||||||
val urlString = "$baseUrl?t=${System.currentTimeMillis()}"
|
val urlString = "$baseUrl?t=${System.currentTimeMillis()}"
|
||||||
|
|
||||||
Thread {
|
Thread {
|
||||||
@@ -132,6 +132,6 @@ class NoticeActivity : AppCompatActivity() {
|
|||||||
notices.add(NoticeItem("v$currentVersion 업데이트 정보", currentDate, currentBody.toString().trim()))
|
notices.add(NoticeItem("v$currentVersion 업데이트 정보", currentDate, currentBody.toString().trim()))
|
||||||
}
|
}
|
||||||
|
|
||||||
return notices.take(7)
|
return notices.take(15)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,46 +1,5 @@
|
|||||||
package com.example.shiftalarm
|
package com.example.shiftalarm
|
||||||
|
|
||||||
import java.io.File
|
|
||||||
|
|
||||||
object RootUtil {
|
object RootUtil {
|
||||||
fun isDeviceRooted(): Boolean {
|
fun isDeviceRooted(): Boolean = false
|
||||||
return checkRootMethod1() || checkRootMethod2() || checkRootMethod3()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun checkRootMethod1(): Boolean {
|
|
||||||
val buildTags = android.os.Build.TAGS
|
|
||||||
return buildTags != null && buildTags.contains("test-keys")
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun checkRootMethod2(): Boolean {
|
|
||||||
val paths = arrayOf(
|
|
||||||
"/system/app/Superuser.apk",
|
|
||||||
"/sbin/su",
|
|
||||||
"/system/bin/su",
|
|
||||||
"/system/xbin/su",
|
|
||||||
"/data/local/xbin/su",
|
|
||||||
"/data/local/bin/su",
|
|
||||||
"/system/sd/xbin/su",
|
|
||||||
"/system/bin/failsafe/su",
|
|
||||||
"/data/local/su",
|
|
||||||
"/su/bin/su"
|
|
||||||
)
|
|
||||||
for (path in paths) {
|
|
||||||
if (File(path).exists()) return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun checkRootMethod3(): Boolean {
|
|
||||||
var process: Process? = null
|
|
||||||
return try {
|
|
||||||
process = Runtime.getRuntime().exec(arrayOf("/system/xbin/which", "su"))
|
|
||||||
val reader = process.inputStream.bufferedReader()
|
|
||||||
reader.readLine() != null
|
|
||||||
} catch (t: Throwable) {
|
|
||||||
false
|
|
||||||
} finally {
|
|
||||||
process?.destroy()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,8 +49,7 @@ class SettingsActivity : AppCompatActivity() {
|
|||||||
val targetTab = intent.getIntExtra("TARGET_TAB", 0)
|
val targetTab = intent.getIntExtra("TARGET_TAB", 0)
|
||||||
binding.viewPager.setCurrentItem(targetTab, false)
|
binding.viewPager.setCurrentItem(targetTab, false)
|
||||||
|
|
||||||
binding.btnSave.text = "닫기"
|
binding.btnCloseSettings.setOnClickListener {
|
||||||
binding.btnSave.setOnClickListener {
|
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+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>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<corners android:radius="10dp" />
|
||||||
|
<solid android:color="#1A007AFF" />
|
||||||
|
</shape>
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<corners android:radius="10dp" />
|
||||||
|
<solid android:color="#1AFF3B30" />
|
||||||
|
</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="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
||||||
|
</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>
|
||||||
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="M21,10.12h-6.78l2.74,-2.82c-2.73,-2.7 -7.15,-2.8 -9.88,-0.1 -2.73,2.71 -2.73,7.08 0,9.79s7.15,2.71 9.88,0C18.32,15.65 19,14.08 19,12.1h2c0,2.49 -0.95,4.83 -2.73,6.6 -3.76,3.73 -9.85,3.73 -13.6,0 -3.76,-3.73 -3.76,-9.78 0,-13.51 3.76,-3.73 9.84,-3.73 13.6,0L21,2.42v7.7z"/>
|
||||||
|
</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>
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
android:id="@+id/headerRoot"
|
android:id="@+id/headerRoot"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="12dp"
|
android:paddingTop="2dp"
|
||||||
android:paddingBottom="8dp"
|
android:paddingBottom="4dp"
|
||||||
android:paddingHorizontal="20dp"
|
android:paddingHorizontal="20dp"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
@@ -35,7 +35,8 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="오늘의 근무"
|
android:text="오늘의 근무"
|
||||||
android:textSize="13sp"
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold"
|
||||||
android:textColor="@color/text_secondary"
|
android:textColor="@color/text_secondary"
|
||||||
android:fontFamily="sans-serif-medium"
|
android:fontFamily="sans-serif-medium"
|
||||||
android:layout_marginStart="12dp"
|
android:layout_marginStart="12dp"
|
||||||
@@ -58,26 +59,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 +315,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
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
android:id="@+id/btnCloseManual"
|
android:id="@+id/btnCloseManual"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:src="@drawable/ic_delete"
|
android:src="@drawable/ic_close"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
app:tint="@color/text_primary"
|
app:tint="@color/text_primary"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
android:id="@+id/btnCloseNotice"
|
android:id="@+id/btnCloseNotice"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:src="@drawable/ic_delete"
|
android:src="@drawable/ic_close"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
app:tint="@color/text_primary"
|
app:tint="@color/text_primary"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
|
|||||||
@@ -7,28 +7,39 @@
|
|||||||
android:background="@drawable/bg_mesh_gradient"
|
android:background="@drawable/bg_mesh_gradient"
|
||||||
android:id="@+id/settings_root">
|
android:id="@+id/settings_root">
|
||||||
|
|
||||||
|
<!-- Top Header: Title + Close Icon Button -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/settingsHeader"
|
android:id="@+id/settingsHeader"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:paddingTop="32dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingBottom="16dp"
|
android:paddingBottom="8dp"
|
||||||
android:paddingStart="24dp"
|
android:paddingStart="24dp"
|
||||||
android:paddingEnd="24dp"
|
android:paddingEnd="16dp"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent">
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/settingsTitle"
|
android:id="@+id/settingsTitle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
android:text="설정"
|
android:text="설정"
|
||||||
android:textColor="@color/text_primary"
|
android:textColor="@color/text_primary"
|
||||||
android:textSize="32sp"
|
android:textSize="30sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:letterSpacing="-0.03"/>
|
android:letterSpacing="-0.03"/>
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/btnCloseSettings"
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:src="@drawable/ic_close"
|
||||||
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
|
app:tint="@color/text_primary"
|
||||||
|
android:padding="10dp"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabLayout
|
<com.google.android.material.tabs.TabLayout
|
||||||
@@ -46,33 +57,12 @@
|
|||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/settingsHeader"/>
|
app:layout_constraintTop_toBottomOf="@id/settingsHeader"/>
|
||||||
|
|
||||||
|
<!-- Full-height ViewPager2 without cramped bottom bar -->
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
android:id="@+id/viewPager"
|
android:id="@+id/viewPager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tabLayout"
|
app:layout_constraintTop_toBottomOf="@id/tabLayout"
|
||||||
app:layout_constraintBottom_toTopOf="@id/bottomActionLayout"/>
|
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/bottomActionLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="20dp"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent">
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btnSave"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="58dp"
|
|
||||||
android:text="닫기"
|
|
||||||
android:textSize="17sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
app:cornerRadius="29dp"
|
|
||||||
android:backgroundTint="@color/primary"
|
|
||||||
android:elevation="6dp"
|
|
||||||
android:stateListAnimator="@null"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
@@ -7,169 +7,279 @@
|
|||||||
app:cardElevation="8dp"
|
app:cardElevation="8dp"
|
||||||
app:cardBackgroundColor="@android:color/transparent">
|
app:cardBackgroundColor="@android:color/transparent">
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:fillViewport="true"
|
||||||
android:background="@drawable/bg_dialog_solid_v4"
|
android:overScrollMode="never">
|
||||||
android:padding="20dp">
|
|
||||||
|
|
||||||
<!-- Header: Date and Shift -->
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:gravity="center"
|
android:background="@drawable/bg_dialog_solid_v4"
|
||||||
android:paddingTop="8dp"
|
android:padding="20dp">
|
||||||
android:paddingBottom="20dp">
|
|
||||||
|
<!-- Header: Date and Shift -->
|
||||||
<TextView
|
|
||||||
android:id="@+id/dialogSubtitle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="내일의 근무"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="@color/text_secondary"
|
|
||||||
android:layout_marginBottom="4dp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/dialogTitle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="2월 12일 (주간)"
|
|
||||||
android:textSize="22sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="@color/text_primary"
|
|
||||||
android:letterSpacing="-0.02"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- 5-Column Grid Refactored -->
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<!-- Row 1 -->
|
|
||||||
<TextView android:id="@+id/btnJu" style="@style/ShiftCircleButton" android:text="주" android:textColor="@color/shift_ju"/>
|
|
||||||
<TextView android:id="@+id/btnSeok" style="@style/ShiftCircleButton" android:text="석" android:textColor="@color/shift_seok"/>
|
|
||||||
<TextView android:id="@+id/btnYa" style="@style/ShiftCircleButton" android:text="야" android:textColor="@color/shift_ya"/>
|
|
||||||
<TextView android:id="@+id/btnJuMat" style="@style/ShiftCircleButton" android:text="주맞" android:textSize="13sp" android:textColor="@color/shift_jumat"/>
|
|
||||||
<TextView android:id="@+id/btnYaMat" style="@style/ShiftCircleButton" android:text="야맞" android:textSize="13sp" android:textColor="@color/shift_yamat"/>
|
|
||||||
|
|
||||||
<!-- Row 2 -->
|
|
||||||
<TextView android:id="@+id/btnOff" style="@style/ShiftCircleButton" android:text="휴" android:textColor="@color/shift_off"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
<TextView android:id="@+id/btnWolcha" style="@style/ShiftCircleButton" android:text="월차" android:textSize="13sp" android:textColor="@color/secondary"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
<TextView android:id="@+id/btnYeoncha" style="@style/ShiftCircleButton" android:text="연차" android:textSize="13sp" android:textColor="@color/secondary"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
<TextView android:id="@+id/btnBanwol" style="@style/ShiftCircleButton" android:text="반월" android:textSize="13sp" android:textColor="@color/shift_red"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
<TextView android:id="@+id/btnBannyeon" style="@style/ShiftCircleButton" android:text="반년" android:textSize="13sp" android:textColor="@color/shift_red"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
|
|
||||||
<!-- Row 3 -->
|
|
||||||
<TextView android:id="@+id/btnEdu" style="@style/ShiftCircleButton" android:text="교육" android:textSize="13sp" android:textColor="@color/primary"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
<TextView android:id="@+id/btnReset" style="@style/ShiftCircleButton" android:text="초기" android:textSize="13sp" android:textColor="@color/text_secondary"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
<TextView android:id="@+id/btnManual" style="@style/ShiftCircleButton" android:text="직접" android:textSize="14sp" android:textColor="@color/shift_gray"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.helper.widget.Flow
|
|
||||||
android:id="@+id/gridFlow"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:constraint_referenced_ids="btnJu,btnSeok,btnYa,btnJuMat,btnYaMat, btnOff,btnWolcha,btnYeoncha,btnBanwol,btnBannyeon, btnEdu,btnReset,btnManual"
|
|
||||||
app:flow_wrapMode="aligned"
|
|
||||||
app:flow_maxElementsWrap="5"
|
|
||||||
app:flow_horizontalStyle="packed"
|
|
||||||
app:flow_horizontalGap="8dp"
|
|
||||||
app:flow_verticalGap="12dp"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/memoDivider"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="@color/grid_divider"
|
|
||||||
android:layout_marginTop="20dp"/>
|
|
||||||
|
|
||||||
<!-- Memo Section -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:background="@drawable/bg_glass_button_light"
|
|
||||||
android:padding="16dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="vertical"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center"
|
||||||
android:layout_marginBottom="12dp">
|
android:paddingTop="4dp"
|
||||||
|
android:paddingBottom="16dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/memoTitle"
|
android:id="@+id/dialogSubtitle"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:text="내일의 근무"
|
||||||
android:text="하루 메모"
|
android:textSize="14sp"
|
||||||
android:textSize="15sp"
|
android:textColor="@color/text_secondary"
|
||||||
android:textStyle="bold"
|
android:layout_marginBottom="4dp"/>
|
||||||
android:textColor="@color/text_primary"/>
|
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:id="@+id/btnClearMemo"
|
android:id="@+id/dialogTitle"
|
||||||
android:layout_width="28dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="28dp"
|
android:layout_height="wrap_content"
|
||||||
android:src="@drawable/ic_delete"
|
android:text="2월 12일 (주간)"
|
||||||
app:tint="@color/shift_red"
|
android:textSize="22sp"
|
||||||
android:padding="6dp"
|
android:textStyle="bold"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"/>
|
android:textColor="@color/text_primary"
|
||||||
|
android:letterSpacing="-0.02"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<EditText
|
<!-- 3-Row Clean Shift Buttons Grid (Zero Overlap Guaranteed) -->
|
||||||
android:id="@+id/etMemo"
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="여기에 메모를 입력하세요"
|
android:orientation="vertical">
|
||||||
android:inputType="textMultiLine|textNoSuggestions"
|
|
||||||
android:minLines="2"
|
<!-- Row 1: 주, 석, 야, 주맞, 야맞 -->
|
||||||
android:maxLines="4"
|
<LinearLayout
|
||||||
android:gravity="top|start"
|
android:layout_width="match_parent"
|
||||||
android:textSize="15sp"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/text_primary"
|
android:orientation="horizontal"
|
||||||
android:background="@android:color/transparent"
|
android:gravity="center"
|
||||||
android:padding="0dp"/>
|
android:layout_marginBottom="10dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnJu"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="주"
|
||||||
|
android:textColor="@color/shift_ju"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnSeok"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="석"
|
||||||
|
android:textColor="@color/shift_seok"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnYa"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="야"
|
||||||
|
android:textColor="@color/shift_ya"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnJuMat"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="주맞"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/shift_jumat"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnYaMat"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="야맞"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/shift_yamat"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Row 2: 휴, 월차, 연차, 반월, 반년 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginBottom="10dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnOff"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="휴"
|
||||||
|
android:textColor="@color/shift_off"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnWolcha"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="월차"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/secondary"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnYeoncha"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="연차"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/secondary"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnBanwol"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="반월"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/shift_red"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnBannyeon"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="반년"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/shift_red"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Row 3: 교육, 원래대로(초기), 직접 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnEdu"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="교육"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/primary"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnReset"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="초기"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/text_secondary"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnManual"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="직접"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/shift_gray"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/memoDivider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/grid_divider"
|
||||||
|
android:layout_marginTop="16dp"/>
|
||||||
|
|
||||||
|
<!-- Memo Section with Quick Save Bar -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:background="@drawable/bg_glass_button_light"
|
||||||
|
android:padding="14dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:layout_marginBottom="8dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/memoTitle"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="하루 메모"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/text_primary"/>
|
||||||
|
|
||||||
|
<!-- 휴지통 아이콘 버튼 -->
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/btnClearMemo"
|
||||||
|
android:layout_width="34dp"
|
||||||
|
android:layout_height="34dp"
|
||||||
|
android:background="@drawable/bg_icon_container_red"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:foreground="?attr/selectableItemBackgroundBorderless"
|
||||||
|
android:layout_marginEnd="8dp">
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:src="@drawable/ic_delete"
|
||||||
|
app:tint="#FF3B30"/>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<!-- 저장 아이콘 버튼 -->
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/btnQuickSaveMemo"
|
||||||
|
android:layout_width="34dp"
|
||||||
|
android:layout_height="34dp"
|
||||||
|
android:background="@drawable/bg_icon_container_blue"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:foreground="?attr/selectableItemBackgroundBorderless">
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:src="@drawable/ic_check"
|
||||||
|
app:tint="#007AFF"/>
|
||||||
|
</FrameLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etMemo"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="여기에 메모를 입력하세요 (최대 4줄)"
|
||||||
|
android:inputType="textMultiLine|textNoSuggestions"
|
||||||
|
android:minLines="2"
|
||||||
|
android:maxLines="4"
|
||||||
|
android:gravity="top|start"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:textColor="@color/text_primary"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:padding="2dp"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btnClose"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="52dp"
|
||||||
|
android:text="저장 및 닫기"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
app:cornerRadius="26dp"
|
||||||
|
android:backgroundTint="@color/primary"
|
||||||
|
android:elevation="2dp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btnClose"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="56dp"
|
|
||||||
android:text="저장 및 닫기"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
app:cornerRadius="28dp"
|
|
||||||
android:backgroundTint="@color/primary"
|
|
||||||
android:elevation="2dp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</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
|
||||||
@@ -139,8 +139,7 @@
|
|||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:background="@drawable/bg_spinner_oneui"
|
android:background="@drawable/bg_spinner_oneui"
|
||||||
android:popupBackground="@drawable/bg_spinner_popup_oneui"
|
android:popupBackground="@drawable/bg_spinner_popup_oneui"
|
||||||
android:dropDownVerticalOffset="6dp"
|
android:dropDownVerticalOffset="6dp"/>
|
||||||
android:paddingStart="12dp"/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
@@ -260,7 +259,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 +308,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 +356,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
|
||||||
@@ -398,32 +397,116 @@
|
|||||||
app:cardCornerRadius="24dp"
|
app:cardCornerRadius="24dp"
|
||||||
app:cardElevation="0dp"
|
app:cardElevation="0dp"
|
||||||
app:cardBackgroundColor="@android:color/transparent"
|
app:cardBackgroundColor="@android:color/transparent"
|
||||||
android:layout_marginBottom="40dp">
|
android:layout_marginBottom="32dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:background="@drawable/bg_oneui_settings_card"
|
android:background="@drawable/bg_oneui_settings_card"
|
||||||
android:padding="20dp">
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<!-- 1. 개별 근무/알람 설정 전체 삭제 -->
|
||||||
<androidx.appcompat.widget.AppCompatButton
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btnResetOverrides"
|
android:id="@+id/btnResetOverrides"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:text="개별 근무/알람 설정 전체 삭제"
|
android:text="개별 근무/알람 설정 전체 삭제"
|
||||||
android:textColor="@color/shift_red"
|
android:textColor="@color/text_primary"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textSize="15sp"
|
android:textSize="14sp"
|
||||||
android:background="@drawable/bg_glass_button_light"/>
|
android:background="@drawable/bg_glass_button_light"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="달력에서 개별적으로 바꾼 근무와 알람 시간이 모두 기본값으로 복구됩니다."
|
android:text="달력에서 개별 변경한 근무와 알람 시간을 모두 기본값으로 복구합니다."
|
||||||
android:textSize="11sp"
|
android:textSize="11sp"
|
||||||
android:textColor="@color/text_tertiary"
|
android:textColor="@color/text_tertiary"
|
||||||
android:layout_marginTop="8dp"/>
|
android:layout_marginTop="4dp"
|
||||||
|
android:layout_marginBottom="12dp"
|
||||||
|
android:layout_marginStart="4dp"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0.5dp"
|
||||||
|
android:background="@color/divider_subtle"
|
||||||
|
android:layout_marginBottom="12dp"/>
|
||||||
|
|
||||||
|
<!-- 2. 개별 근무 삭제 -->
|
||||||
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
|
android:id="@+id/btnResetShifts"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:text="개별 근무 삭제"
|
||||||
|
android:textColor="@color/text_primary"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:background="@drawable/bg_glass_button_light"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="달력에서 개별 변경한 교대근무 일정만 기본값으로 복구합니다."
|
||||||
|
android:textSize="11sp"
|
||||||
|
android:textColor="@color/text_tertiary"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:layout_marginBottom="12dp"
|
||||||
|
android:layout_marginStart="4dp"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0.5dp"
|
||||||
|
android:background="@color/divider_subtle"
|
||||||
|
android:layout_marginBottom="12dp"/>
|
||||||
|
|
||||||
|
<!-- 3. 알람 삭제 -->
|
||||||
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
|
android:id="@+id/btnResetAlarms"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:text="알람 삭제"
|
||||||
|
android:textColor="@color/text_primary"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:background="@drawable/bg_glass_button_light"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="추가된 사용자 지정 알람을 모두 삭제하고 기본 설정으로 복원합니다."
|
||||||
|
android:textSize="11sp"
|
||||||
|
android:textColor="@color/text_tertiary"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:layout_marginBottom="12dp"
|
||||||
|
android:layout_marginStart="4dp"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0.5dp"
|
||||||
|
android:background="@color/divider_subtle"
|
||||||
|
android:layout_marginBottom="12dp"/>
|
||||||
|
|
||||||
|
<!-- 4. 전체 삭제 (완전 초기화) -->
|
||||||
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
|
android:id="@+id/btnResetAll"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:text="전체 삭제"
|
||||||
|
android:textColor="@color/shift_red"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:background="@drawable/bg_glass_button_light"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="메모, 연차, 개별 근무, 알람 등 앱의 모든 데이터를 완전히 초기화합니다."
|
||||||
|
android:textSize="11sp"
|
||||||
|
android:textColor="@color/shift_red"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:layout_marginStart="4dp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
|||||||
@@ -12,33 +12,44 @@
|
|||||||
android:background="@color/surface"
|
android:background="@color/surface"
|
||||||
android:padding="16dp">
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<!-- Master Alarm Header with Switch -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/masterAlarmCard"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:paddingHorizontal="8dp"
|
android:background="@drawable/bg_group_header"
|
||||||
android:layout_marginBottom="8dp">
|
android:paddingHorizontal="16dp"
|
||||||
|
android:paddingVertical="12dp"
|
||||||
|
android:layout_marginBottom="12dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivMasterBell"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:src="@drawable/ic_bell"
|
||||||
|
app:tint="@color/primary"
|
||||||
|
android:layout_marginEnd="10dp"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvMasterStatus"
|
android:id="@+id/tvMasterStatus"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="전체 알람 켜짐"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/text_primary"/>
|
||||||
|
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/masterSwitch"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="전체 알람 켜짐"
|
app:thumbTint="@color/white"
|
||||||
android:textSize="13sp"
|
app:trackTint="@color/sl_switch_track"/>
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="@color/primary"
|
|
||||||
android:background="@drawable/bg_glass_pill_v4"
|
|
||||||
android:backgroundTint="#F2F2F7"
|
|
||||||
android:paddingHorizontal="12dp"
|
|
||||||
android:paddingVertical="6dp"
|
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"/>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_weight="1"/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- Unified Alarm List Container (Background removed as items are now individual cards) -->
|
<!-- Unified Alarm List Container (Background removed as items are now individual cards) -->
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -75,8 +75,7 @@
|
|||||||
android:entries="@array/factory_array"
|
android:entries="@array/factory_array"
|
||||||
android:background="@drawable/bg_spinner_oneui"
|
android:background="@drawable/bg_spinner_oneui"
|
||||||
android:popupBackground="@drawable/bg_spinner_popup_oneui"
|
android:popupBackground="@drawable/bg_spinner_popup_oneui"
|
||||||
android:dropDownVerticalOffset="6dp"
|
android:dropDownVerticalOffset="6dp"/>
|
||||||
android:paddingStart="12dp"/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
@@ -102,8 +101,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
|
||||||
@@ -121,8 +120,7 @@
|
|||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:background="@drawable/bg_spinner_oneui"
|
android:background="@drawable/bg_spinner_oneui"
|
||||||
android:popupBackground="@drawable/bg_spinner_popup_oneui"
|
android:popupBackground="@drawable/bg_spinner_popup_oneui"
|
||||||
android:dropDownVerticalOffset="6dp"
|
android:dropDownVerticalOffset="6dp"/>
|
||||||
android:paddingStart="12dp"/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
@@ -175,8 +173,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 +230,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 +286,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 +342,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 +399,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
|
||||||
@@ -469,8 +467,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_update"
|
||||||
app:tint="@color/primary"/>
|
app:tint="#5856D6"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -478,7 +476,7 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="최신 버전 확인"
|
android:text="최신 버전 확인"
|
||||||
android:textColor="@color/primary"
|
android:textColor="@color/text_primary"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold"/>
|
android:textStyle="bold"/>
|
||||||
|
|
||||||
|
|||||||
@@ -86,8 +86,7 @@
|
|||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:background="@drawable/bg_spinner_oneui"
|
android:background="@drawable/bg_spinner_oneui"
|
||||||
android:popupBackground="@drawable/bg_spinner_popup_oneui"
|
android:popupBackground="@drawable/bg_spinner_popup_oneui"
|
||||||
android:dropDownVerticalOffset="6dp"
|
android:dropDownVerticalOffset="6dp"/>
|
||||||
android:paddingStart="12dp"/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
android:id="@android:id/text1"
|
android:id="@android:id/text1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:gravity="center_vertical|end"
|
android:gravity="center"
|
||||||
android:paddingStart="12dp"
|
android:textAlignment="center"
|
||||||
android:paddingEnd="16dp"
|
android:paddingHorizontal="4dp"
|
||||||
android:textColor="@color/text_primary"
|
android:textColor="@color/text_primary"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
|||||||
+23
-20
@@ -6,19 +6,16 @@ import shutil
|
|||||||
|
|
||||||
token = "e3b515eaa0a6683c921ca3bf718e281ed30a6075"
|
token = "e3b515eaa0a6683c921ca3bf718e281ed30a6075"
|
||||||
owner_repo = "sanjeok77/ShiftRing"
|
owner_repo = "sanjeok77/ShiftRing"
|
||||||
tag = "v1.0.1"
|
tag = "v1.1.8"
|
||||||
title = "v1.0.1 - 알람 반복 횟수 선택 버그 수정, 달력 상단 연장근무 인디고 컬러 개편, 알람 그룹 아코디언 & +/x 부드러운 회전 애니메이션 적용"
|
title = "v1.1.8 - 교육 근무 변경 시 상단 알람 표시 및 실제 알람 완전 유지"
|
||||||
body = """## 🚀 ShiftRing v1.0.1 릴리즈
|
body = """## 🚀 ShiftRing v1.1.8 릴리즈
|
||||||
|
|
||||||
### 🌟 주요 변경 및 버그 수정 사항
|
### 🐛 버그 수정
|
||||||
1. **알람 수정 다이얼로그 반복 횟수 선택 버그 수정**:
|
1. **⏰ 교육 근무 변경 시 알람 완전 유지 (`MainActivity.kt`, `AlarmUtils.kt`, `AlarmSyncManager.kt`)**:
|
||||||
- 알람 수정 및 추가 화면에서 반복 횟수(3회 / 5회 / 계속) 선택이 즉시 반영되고 저장되도록 클릭 리스너 및 UI 갱신 로직 완벽 복구
|
- 달력에서 교육으로 변경해도 상단 오늘/내일 알람 시간이 정상 표시
|
||||||
2. **달력 메인 상단 연장근무 표시 컬러 인디고(#5856D6) 개편**:
|
- 원래 근무(주간/석간/야간 등) 알람이 그대로 울림
|
||||||
- 휴무/휴가 붉은색(`shift_red`)과 혼동되지 않도록 또렷하고 세련된 One UI 인디고(`bg_chip_soft_overtime.xml`) 칩 스타일로 변경
|
- 토스트 메시지: "교육으로 기록되었습니다. 원래 근무 알람이 유지됩니다."
|
||||||
3. **알람 그룹 접기/펼치기 아코디언 & 회전 애니메이션 적용**:
|
- 교육을 월차/연차 등과 분리하여 독립 처리"""
|
||||||
- 알람 그룹 헤더 터치 시 `AutoTransition` 기반 부드러운 아코디언 높이/투명도 애니메이션 적용
|
|
||||||
- 접힘/열림 상태에 따라 `+` (0도) ↔ `x` (45도) 아이콘이 유체 감속 곡선(`PathInterpolator(0.22, 1, 0.36, 1)`)으로 매끄럽게 회전 전환되도록 구현
|
|
||||||
4. **Android 14/15 호환 및 정식 서명키(release.jks) 적용**"""
|
|
||||||
|
|
||||||
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):
|
||||||
@@ -27,18 +24,16 @@ if not os.path.exists(apk_path):
|
|||||||
|
|
||||||
print(f"Using APK at: {apk_path}")
|
print(f"Using APK at: {apk_path}")
|
||||||
|
|
||||||
# Create Gitea Release
|
|
||||||
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())
|
||||||
release_id = result["id"]
|
release_id = result["id"]
|
||||||
print(f"Created Gitea Release successfully. Release ID: {release_id}")
|
print(f"Created Gitea Release successfully. Release ID: {release_id}")
|
||||||
|
|
||||||
# Upload APK asset
|
|
||||||
upload_url = f"https://git.webpluss.net/api/v1/repos/{owner_repo}/releases/{release_id}/assets"
|
upload_url = f"https://git.webpluss.net/api/v1/repos/{owner_repo}/releases/{release_id}/assets"
|
||||||
print(f"Uploading APK to {upload_url}...")
|
print(f"Uploading APK to {upload_url}...")
|
||||||
|
|
||||||
@@ -50,20 +45,28 @@ upload_json = json.loads(upload_result.stdout)
|
|||||||
apk_uuid = upload_json.get("uuid")
|
apk_uuid = upload_json.get("uuid")
|
||||||
direct_url = upload_json.get("browser_download_url", f"https://git.webpluss.net/attachments/{apk_uuid}")
|
direct_url = upload_json.get("browser_download_url", f"https://git.webpluss.net/attachments/{apk_uuid}")
|
||||||
|
|
||||||
# Copy APK to project root
|
|
||||||
shutil.copy2(apk_path, "app.apk")
|
shutil.copy2(apk_path, "app.apk")
|
||||||
print("Updated app.apk at project root.")
|
print("Updated app.apk at project root.")
|
||||||
|
|
||||||
# Update version.json
|
|
||||||
v_info = {
|
v_info = {
|
||||||
"versionCode": 101,
|
"versionCode": 118,
|
||||||
"versionName": "1.0.1",
|
"versionName": "1.1.8",
|
||||||
"apkUrl": direct_url,
|
"apkUrl": direct_url,
|
||||||
"changelog": "v1.0.1: 알람 반복 횟수 선택 버그 수정, 달력 상단 연장근무 인디고 컬러 개편, 알람 그룹 아코디언 및 +/x 회전 애니메이션 적용",
|
"changelog": "v1.1.8: 교육 근무 변경 시 상단 알람 표시 및 실제 알람 완전 유지",
|
||||||
"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_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.1.8 - 교육 근무 변경 시 상단 알람 표시 및 실제 알람 완전 유지"
|
||||||
|
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": 101,
|
"versionCode": 118,
|
||||||
"versionName": "1.0.1",
|
"versionName": "1.1.8",
|
||||||
"apkUrl": "https://git.webpluss.net/attachments/36f93969-59ff-490d-b701-6d7f35382c28",
|
"apkUrl": "https://git.webpluss.net/attachments/219203d6-2f0f-4e23-984d-438f96c7d193",
|
||||||
"changelog": "v1.0.1: 알람 반복 횟수 선택 버그 수정, 달력 상단 연장근무 인디고 컬러 개편, 알람 그룹 아코디언 및 +/x 회전 애니메이션 적용",
|
"changelog": "v1.1.8: 교육 근무 변경 시 상단 알람 표시 및 실제 알람 완전 유지",
|
||||||
"forceUpdate": false
|
"forceUpdate": false
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user