Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2aa3ff15b2 | ||
|
|
2cc6a6e487 |
@@ -20,8 +20,8 @@ android {
|
|||||||
applicationId = "com.example.shiftalarm"
|
applicationId = "com.example.shiftalarm"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 100
|
versionCode = 101
|
||||||
versionName = "1.0.0"
|
versionName = "1.0.1"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -247,16 +247,31 @@ class FragmentSettingsAlarm : Fragment(), SharedPreferences.OnSharedPreferenceCh
|
|||||||
visibility = if (isCollapsed) View.GONE else View.VISIBLE
|
visibility = if (isCollapsed) View.GONE else View.VISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
// Click header to collapse/expand
|
// Click header to collapse/expand with smooth accordion animation
|
||||||
headerView.setOnClickListener {
|
headerView.setOnClickListener {
|
||||||
if (collapsedGroups.contains(category)) {
|
val willExpand = collapsedGroups.contains(category)
|
||||||
|
|
||||||
|
// 1. Smooth accordion expand/collapse transition
|
||||||
|
val transition = android.transition.AutoTransition().apply {
|
||||||
|
duration = 250
|
||||||
|
interpolator = android.view.animation.AccelerateDecelerateInterpolator()
|
||||||
|
}
|
||||||
|
android.transition.TransitionManager.beginDelayedTransition(container, transition)
|
||||||
|
|
||||||
|
// 2. Smooth rotation between '+' (0 deg) and 'x' (45 deg)
|
||||||
|
val targetRotation = if (willExpand) 45f else 0f
|
||||||
|
ivExpand.animate()
|
||||||
|
.rotation(targetRotation)
|
||||||
|
.setDuration(250)
|
||||||
|
.setInterpolator(androidx.core.view.animation.PathInterpolatorCompat.create(0.22f, 1.0f, 0.36f, 1.0f))
|
||||||
|
.start()
|
||||||
|
|
||||||
|
if (willExpand) {
|
||||||
collapsedGroups.remove(category)
|
collapsedGroups.remove(category)
|
||||||
childrenContainer.visibility = View.VISIBLE
|
childrenContainer.visibility = View.VISIBLE
|
||||||
ivExpand.rotation = 45f
|
|
||||||
} else {
|
} else {
|
||||||
collapsedGroups.add(category)
|
collapsedGroups.add(category)
|
||||||
childrenContainer.visibility = View.GONE
|
childrenContainer.visibility = View.GONE
|
||||||
ivExpand.rotation = 0f
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -511,6 +526,13 @@ class FragmentSettingsAlarm : Fragment(), SharedPreferences.OnSharedPreferenceCh
|
|||||||
btn.setTextColor(if (isSelected) ContextCompat.getColor(requireContext(), R.color.white) else ContextCompat.getColor(requireContext(), R.color.text_secondary))
|
btn.setTextColor(if (isSelected) ContextCompat.getColor(requireContext(), R.color.white) else ContextCompat.getColor(requireContext(), R.color.text_secondary))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
updateRepeatUI()
|
||||||
|
repeatButtons.forEachIndexed { i, btn ->
|
||||||
|
btn.setOnClickListener {
|
||||||
|
selectedRepeat = repeatValues[i]
|
||||||
|
updateRepeatUI()
|
||||||
|
}
|
||||||
|
}
|
||||||
// Pre-Alarm Buttons
|
// Pre-Alarm Buttons
|
||||||
var selectedPreAlarm = 15
|
var selectedPreAlarm = 15
|
||||||
val preAlarmButtons = listOf(
|
val preAlarmButtons = listOf(
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
<solid android:color="#20FF3B30" />
|
<solid android:color="#205856D6" />
|
||||||
<corners android:radius="12dp" />
|
<corners android:radius="12dp" />
|
||||||
<stroke
|
<stroke
|
||||||
android:width="0.5dp"
|
android:width="0.5dp"
|
||||||
android:color="#40FF3B30" />
|
android:color="#405856D6" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|||||||
@@ -269,7 +269,7 @@
|
|||||||
android:textSize="10.5sp"
|
android:textSize="10.5sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="@color/shift_red"
|
android:textColor="#5856D6"
|
||||||
android:background="@drawable/bg_chip_soft_overtime"/>
|
android:background="@drawable/bg_chip_soft_overtime"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
+36
-62
@@ -6,33 +6,19 @@ import shutil
|
|||||||
|
|
||||||
token = "e3b515eaa0a6683c921ca3bf718e281ed30a6075"
|
token = "e3b515eaa0a6683c921ca3bf718e281ed30a6075"
|
||||||
owner_repo = "sanjeok77/ShiftRing"
|
owner_repo = "sanjeok77/ShiftRing"
|
||||||
tag = "v2.3.0"
|
tag = "v1.0.1"
|
||||||
title = "v2.3.0 - One UI 8.5 전면 통일 & 법정 대체공휴일 수식 & 복합 연장근무 & 알람 그룹 순서 자동 정렬 대규모 완성 릴리즈"
|
title = "v1.0.1 - 알람 반복 횟수 선택 버그 수정, 달력 상단 연장근무 인디고 컬러 개편, 알람 그룹 아코디언 & +/x 부드러운 회전 애니메이션 적용"
|
||||||
body = """## 🚀 Shiftring v2.3.0 대규모 마이너 릴리즈
|
body = """## 🚀 ShiftRing v1.0.1 릴리즈
|
||||||
|
|
||||||
### 🌟 전면 통합 및 주요 개선 완료 사항
|
### 🌟 주요 변경 및 버그 수정 사항
|
||||||
1. **설정 화면 4개 탭 One UI 8.5 전면 통일**:
|
1. **알람 수정 다이얼로그 반복 횟수 선택 버그 수정**:
|
||||||
- 기본설정, 알람설정, 부가기능, 근무관리 전체 탭에 24dp 라운드 카드(`bg_oneui_settings_card`) 및 36dp 스퀘어클 Soft-tint 아이콘(`bg_oneui_icon_container`) 시스템 완벽 적용
|
- 알람 수정 및 추가 화면에서 반복 횟수(3회 / 5회 / 계속) 선택이 즉시 반영되고 저장되도록 클릭 리스너 및 UI 갱신 로직 완벽 복구
|
||||||
- 모든 드롭다운(Spinner)을 One UI 20dp 라운드 팝업(`bg_spinner_popup_oneui`), 12dp 알약 선택자 및 6dp 수직 오프셋으로 전면 통일
|
2. **달력 메인 상단 연장근무 표시 컬러 인디고(#5856D6) 개편**:
|
||||||
2. **대한민국 법정 대체공휴일 수식 100% 정밀화**:
|
- 휴무/휴가 붉은색(`shift_red`)과 혼동되지 않도록 또렷하고 세련된 One UI 인디고(`bg_chip_soft_overtime.xml`) 칩 스타일로 변경
|
||||||
- 대통령령 관공서 공휴일 개정안을 반영하여 현충일(6/6), 신정(1/1) 제외 및 설날/추석 일요일 겹침, 단일 공휴일 토/일 겹침 수식 완벽 적용
|
3. **알람 그룹 접기/펼치기 아코디언 & 회전 애니메이션 적용**:
|
||||||
3. **이달의 누적 연장근무 복합 가산 수식**:
|
- 알람 그룹 헤더 터치 시 `AutoTransition` 기반 부드러운 아코디언 높이/투명도 애니메이션 적용
|
||||||
- 토요일 기본 특근(1일당 2h) + 달력 지정 '주맞'(+4h), '야맞'(+4h), '교육'(+2h) 자동 누적 정산
|
- 접힘/열림 상태에 따라 `+` (0도) ↔ `x` (45도) 아이콘이 유체 감속 곡선(`PathInterpolator(0.22, 1, 0.36, 1)`)으로 매끄럽게 회전 전환되도록 구현
|
||||||
4. **알람 그룹 순서 자동 정렬 & 6개 근무 지원**:
|
4. **Android 14/15 호환 및 정식 서명키(release.jks) 적용**"""
|
||||||
- 알람 목록 그룹 순서를 `주간(주) -> 석간(석) -> 야간(야) -> 주간 맞교대(주맞) -> 야간 맞교대(야맞) -> 기타`로 고정 정렬
|
|
||||||
- 그룹 마스터 스위치 및 아코디언 접기/펼치기 유지
|
|
||||||
- 알람 추가/수정 시 6개 근무타입(주/석/야/주맞/야맞/기타) 비율 맞춤 선택 지원
|
|
||||||
5. **메인 달력 유체 모션 & 요약 칩 바**:
|
|
||||||
- 삼성 캘린더 `PathInterpolator(0.22, 1, 0.36, 1)` 기반 부드러운 수평 슬라이드 + 미세 페이드 + 미세 스케일 모션
|
|
||||||
- 상단 `주간 N일 | 석간 N일 | 야간 N일 | 연장 N시간` 실시간 요약 칩 바
|
|
||||||
- 하루 메모 3줄 직관 표시 및 달력 5줄 고정 / 6줄 스크롤 최적화
|
|
||||||
- 날짜 이동 모달 팝업 내부 취소/이동 버튼 및 근무 글자 20sp 대형화
|
|
||||||
6. **배터리 최적화 4-Tier 다중 폴백**:
|
|
||||||
- Samsung Device Care (`com.samsung.android.lool`) 연동으로 100% 이동 보장
|
|
||||||
7. **One UI 8.5 앱 업데이트 다이얼로그**:
|
|
||||||
- 32dp 라운드 카드, #007AFF 선명 블루 버튼, `bg_oneui_progressbar.xml` 실시간 퍼센트 채움 애니메이션
|
|
||||||
8. **Android 14/15 호환 및 정식 서명키(release.jks) 유지**:
|
|
||||||
- `need to declare` 오류 완전 방지 및 덮어쓰기 업데이트 100% 지원"""
|
|
||||||
|
|
||||||
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):
|
||||||
@@ -41,55 +27,43 @@ if not os.path.exists(apk_path):
|
|||||||
|
|
||||||
print(f"Using APK at: {apk_path}")
|
print(f"Using APK at: {apk_path}")
|
||||||
|
|
||||||
# Check if release already exists
|
# 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"}
|
||||||
|
|
||||||
try:
|
data = json.dumps({"tag_name": tag, "name": title, "body": body, "draft": False, "prerelease": False}).encode()
|
||||||
req = urllib.request.Request(f"{url}/tags/{tag}", headers=headers)
|
req = urllib.request.Request(url, data=data, headers=headers, method="POST")
|
||||||
with urllib.request.urlopen(req) as resp:
|
with urllib.request.urlopen(req) as response:
|
||||||
existing = json.loads(resp.read())
|
result = json.loads(response.read())
|
||||||
release_id = existing["id"]
|
release_id = result["id"]
|
||||||
print(f"Existing release found with ID: {release_id}. Updating...")
|
print(f"Created Gitea Release successfully. Release ID: {release_id}")
|
||||||
# Update existing release
|
|
||||||
edit_url = f"{url}/{release_id}"
|
|
||||||
edit_data = json.dumps({"name": title, "body": body}).encode()
|
|
||||||
edit_req = urllib.request.Request(edit_url, data=edit_data, headers=headers, method="PATCH")
|
|
||||||
with urllib.request.urlopen(edit_req) as edit_resp:
|
|
||||||
print("Release details updated successfully.")
|
|
||||||
except Exception as e:
|
|
||||||
# Create new release
|
|
||||||
print("Creating new release...")
|
|
||||||
data = json.dumps({"tag_name": tag, "name": title, "body": body, "draft": False, "prerelease": False}).encode()
|
|
||||||
req = urllib.request.Request(url, data=data, headers=headers, method="POST")
|
|
||||||
with urllib.request.urlopen(req) as response:
|
|
||||||
result = json.loads(response.read())
|
|
||||||
release_id = result["id"]
|
|
||||||
print(f"Created Gitea Release successfully. Release ID: {release_id}")
|
|
||||||
|
|
||||||
# Upload APK asset
|
# 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}...")
|
||||||
|
|
||||||
# Check existing assets and delete if present
|
|
||||||
try:
|
|
||||||
assets_req = urllib.request.Request(upload_url, headers=headers)
|
|
||||||
with urllib.request.urlopen(assets_req) as resp:
|
|
||||||
assets = json.loads(resp.read())
|
|
||||||
for asset in assets:
|
|
||||||
if asset["name"] == "app.apk":
|
|
||||||
del_url = f"https://git.webpluss.net/api/v1/repos/{owner_repo}/releases/{release_id}/assets/{asset['id']}"
|
|
||||||
del_req = urllib.request.Request(del_url, headers=headers, method="DELETE")
|
|
||||||
urllib.request.urlopen(del_req)
|
|
||||||
print(f"Deleted old asset {asset['id']}.")
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Error checking assets: {e}")
|
|
||||||
|
|
||||||
curl_cmd = f'curl -s -X POST "{upload_url}?name=app.apk" -H "Authorization: token {token}" -F "attachment=@{apk_path}"'
|
curl_cmd = f'curl -s -X POST "{upload_url}?name=app.apk" -H "Authorization: token {token}" -F "attachment=@{apk_path}"'
|
||||||
upload_result = subprocess.run(curl_cmd, shell=True, capture_output=True, text=True)
|
upload_result = subprocess.run(curl_cmd, shell=True, capture_output=True, text=True)
|
||||||
print(f"Upload output: {upload_result.stdout}")
|
print(f"Upload output: {upload_result.stdout}")
|
||||||
|
|
||||||
|
upload_json = json.loads(upload_result.stdout)
|
||||||
|
apk_uuid = upload_json.get("uuid")
|
||||||
|
direct_url = upload_json.get("browser_download_url", f"https://git.webpluss.net/attachments/{apk_uuid}")
|
||||||
|
|
||||||
# Copy APK to project root
|
# 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 = {
|
||||||
|
"versionCode": 101,
|
||||||
|
"versionName": "1.0.1",
|
||||||
|
"apkUrl": direct_url,
|
||||||
|
"changelog": "v1.0.1: 알람 반복 횟수 선택 버그 수정, 달력 상단 연장근무 인디고 컬러 개편, 알람 그룹 아코디언 및 +/x 회전 애니메이션 적용",
|
||||||
|
"forceUpdate": False
|
||||||
|
}
|
||||||
|
with open("version.json", "w", encoding="utf-8") as f:
|
||||||
|
json.dump(v_info, f, ensure_ascii=False, indent=2)
|
||||||
|
|
||||||
|
print(f"Updated version.json with apkUrl: {direct_url}")
|
||||||
print(f"Release {tag} process finished!")
|
print(f"Release {tag} process finished!")
|
||||||
|
|||||||
+6
-6
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"versionCode": 100,
|
"versionCode": 101,
|
||||||
"versionName": "1.0.0",
|
"versionName": "1.0.1",
|
||||||
"apkUrl": "",
|
"apkUrl": "https://git.webpluss.net/attachments/36f93969-59ff-490d-b701-6d7f35382c28",
|
||||||
"changelog": "v1.0.0: ShiftRing 정식 첫 릴리즈 - One UI 8.5 디자인 시스템, 교대근무 캘린더, 맞춤 알람 및 법정 공휴일/연장근무 자동 계산",
|
"changelog": "v1.0.1: 알람 반복 횟수 선택 버그 수정, 달력 상단 연장근무 인디고 컬러 개편, 알람 그룹 아코디언 및 +/x 회전 애니메이션 적용",
|
||||||
"forceUpdate": false
|
"forceUpdate": false
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user