v1.1.2 - 하루 메모 키보드 가림 완벽 개선 (상단 즉시 저장 버튼, 뒤로가기 시 자동 저장 및 스크롤 지원)

This commit is contained in:
sanjeok77
2026-08-14 10:39:13 +09:00
parent d012b178b7
commit d993619ff8
6 changed files with 216 additions and 172 deletions
BIN
View File
Binary file not shown.
+2 -2
View File
@@ -20,8 +20,8 @@ android {
applicationId = "com.example.shiftalarm" applicationId = "com.example.shiftalarm"
minSdk = 26 minSdk = 26
targetSdk = 35 targetSdk = 35
versionCode = 111 versionCode = 112
versionName = "1.1.1" versionName = "1.1.2"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
} }
@@ -657,6 +657,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 {
@@ -667,15 +681,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) {
+172 -145
View File
@@ -7,169 +7,196 @@
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">
<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">
<!-- 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="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 <!-- 5-Column Grid Refactored -->
android:id="@+id/etMemo" <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="16dp"/>
<!-- Memo Section with Quick Save Bar -->
<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:layout_marginTop="12dp"
android:minLines="2" android:background="@drawable/bg_glass_button_light"
android:maxLines="4" android:padding="14dp">
android:gravity="top|start"
android:textSize="15sp" <LinearLayout
android:textColor="@color/text_primary" android:layout_width="match_parent"
android:background="@android:color/transparent" android:layout_height="wrap_content"
android:padding="0dp"/> 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"/>
<ImageView
android:id="@+id/btnClearMemo"
android:layout_width="28dp"
android:layout_height="28dp"
android:src="@drawable/ic_delete"
app:tint="@color/shift_red"
android:padding="5dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:layout_marginEnd="8dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/btnQuickSaveMemo"
android:layout_width="wrap_content"
android:layout_height="32dp"
android:text="저장"
android:textSize="13sp"
android:textStyle="bold"
android:textColor="#FFFFFF"
app:cornerRadius="16dp"
android:backgroundTint="@color/primary"
android:paddingHorizontal="12dp"
android:paddingVertical="0dp"
android:minHeight="0dp"
android:minWidth="0dp"
app:icon="@drawable/ic_check"
app:iconSize="14dp"
app:iconTint="#FFFFFF"
app:iconPadding="4dp"/>
</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>
+13 -17
View File
@@ -6,21 +6,17 @@ import shutil
token = "e3b515eaa0a6683c921ca3bf718e281ed30a6075" token = "e3b515eaa0a6683c921ca3bf718e281ed30a6075"
owner_repo = "sanjeok77/ShiftRing" owner_repo = "sanjeok77/ShiftRing"
tag = "v1.1.1" tag = "v1.1.2"
title = "v1.1.1 - 전체 알람 온오프 스위치 및 해제 시 경고 팝업 적용, 앱 정보 화면 바운스 수정, 데이터 초기화 4단계 세분화" title = "v1.1.2 - 하루 메모 키보드 가림 완벽 개선 (상단 즉시 저장 버튼, 뒤로가기 시 자동 저장 및 스크롤 지원)"
body = """## 🚀 ShiftRing v1.1.1 릴리즈 body = """## 🚀 ShiftRing v1.1.2 릴리즈
### 🌟 주요 변경 및 개선 사항 ### 🌟 주요 변경 및 개선 사항
1. **🔘 전체 알람 온/오프 스위치 UI 도입 및 안전 끄기 모달 팝업 (`fragment_settings_alarm.xml`, `FragmentSettingsAlarm.kt`)**: 1. **📝 하루 메모 입력창 상단 '즉시 저장' 버튼 탑재 (`dialog_day_settings.xml`, `MainActivity.kt`)**:
- 기존 텍스트 터치 방식에서 그룹 알람과 동일한 원터치 머티리얼 스위치(`MaterialSwitch`) 카드로 개편 - 가상 키보드가 올라와도 항상 키보드 바로 위에 노출되는 메모 섹션 상단에 파란색 [저장] 액션 버튼을 신설하여 키보드를 내리지 않고도 원터치로 즉시 저장 가능
- 알람을 끌 때는 "전체 알람을 끄시겠습니까? 모든 교대근무 알람이 울리지 않게 됩니다." 경고 다이얼로그(확인/취소)를 띄워 오동작을 방지 2. **🔄 뒤로가기/바깥 터치 시 메모 자동 저장(Auto-Save) 기능 구현 (`MainActivity.kt`)**:
2. **🛡️ 시스템 전체 권한 설정 진입 시 즉시 튕겨 돌아오던 현상 수정 (`FragmentSettingsBasic.kt`, `AlarmPermissionUtil.kt`)**: - 사용자가 백키(Back)를 누르거나 팝업 바깥을 터치하여 닫더라도 작성 중이던 메모 내용이 Room DB에 100% 자동 저장되어 내용 유실을 원천 방지
- 앱 상세 정보 열람 화면에는 자동 복귀 타이머를 배제하고, 개별 권한 설정 시에도 미허용 상태일 때만 지능적으로 동작하도록 개선 3. **📜 다이얼로그 전체 스크롤 및 가상 키보드 동적 리사이징 지원 (`dialog_day_settings.xml`, `MainActivity.kt`)**:
3. **🧹 데이터 초기화 4단계 정밀 세분화 (`fragment_settings_additional.xml`, `FragmentSettingsAdditional.kt`)**: - `NestedScrollView` 및 `SOFT_INPUT_ADJUST_RESIZE`를 적용하여 4줄 메모를 입력하더라도 화면이 잘리지 않고 부드럽게 스크롤되도록 개선"""
- **개별 근무/알람 설정 전체 삭제**: 달력 개별 변경 내역 초기화
- **개별 근무 삭제**: 변경된 교대근무 일정만 복원
- **알람 삭제**: 추가된 커스텀 알람 삭제 및 기본 복원
- **전체 삭제**: 메모, 연차, 근무, 알람 등 전체 앱 데이터 완전 초기화"""
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):
@@ -58,10 +54,10 @@ print("Updated app.apk at project root.")
# Update version.json # Update version.json
v_info = { v_info = {
"versionCode": 111, "versionCode": 112,
"versionName": "1.1.1", "versionName": "1.1.2",
"apkUrl": direct_url, "apkUrl": direct_url,
"changelog": "v1.1.1: 전체 알람 스위치 및 경고 팝업, 앱 상세설정 바운스 수정, 데이터 초기화 4단계 세분화", "changelog": "v1.1.2: 하루 메모 키보드 가림 완벽 개선 (상단 즉시 저장 버튼, 뒤로가기 자동 저장, 스크롤 지원)",
"forceUpdate": False "forceUpdate": False
} }
with open("version.json", "w", encoding="utf-8") as f: with open("version.json", "w", encoding="utf-8") as f:
@@ -73,7 +69,7 @@ print(f"Updated version.json with apkUrl: {direct_url}")
git_path = r"C:\Users\work\AppData\Roaming\MobaXterm\slash\mx86_64b\bin" git_path = r"C:\Users\work\AppData\Roaming\MobaXterm\slash\mx86_64b\bin"
os.environ["PATH"] = git_path + os.pathsep + os.environ.get("PATH", "") os.environ["PATH"] = git_path + os.pathsep + os.environ.get("PATH", "")
commit_msg = "v1.1.1 - 전체 알람 온오프 스위치 및 해제 시 경고 팝업 적용, 앱 정보 화면 바운스 수정, 데이터 초기화 4단계 세분화" commit_msg = "v1.1.2 - 하루 메모 키보드 가림 완벽 개선 (상단 즉시 저장 버튼, 뒤로가기 시 자동 저장 및 스크롤 지원)"
subprocess.run(["git", "add", "."], check=True) subprocess.run(["git", "add", "."], check=True)
subprocess.run(["git", "commit", "-m", commit_msg], check=True) subprocess.run(["git", "commit", "-m", commit_msg], check=True)
subprocess.run(["git", "push", "origin", "main"], check=True) subprocess.run(["git", "push", "origin", "main"], check=True)
+4 -4
View File
@@ -1,7 +1,7 @@
{ {
"versionCode": 111, "versionCode": 112,
"versionName": "1.1.1", "versionName": "1.1.2",
"apkUrl": "https://git.webpluss.net/attachments/338d4f1c-3253-4de6-8632-0232bc1ce7a9", "apkUrl": "https://git.webpluss.net/attachments/0232d016-9a38-413e-96a8-4bea1138b645",
"changelog": "v1.1.1: 전체 알람 스위치 및 경고 팝업, 앱 상세설정 바운스 수정, 데이터 초기화 4단계 세분화", "changelog": "v1.1.2: 하루 메모 키보드 가림 완벽 개선 (상단 즉시 저장 버튼, 뒤로가기 자동 저장, 스크롤 지원)",
"forceUpdate": false "forceUpdate": false
} }