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"
minSdk = 26
targetSdk = 35
versionCode = 111
versionName = "1.1.1"
versionCode = 112
versionName = "1.1.2"
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 {
etMemo.setText("")
lifecycleScope.launch {
@@ -667,15 +681,22 @@ class MainActivity : AppCompatActivity() {
}
dialogView.findViewById<android.view.View>(R.id.btnClose).setOnClickListener {
lifecycleScope.launch {
saveAndCloseMemo()
}
// Auto-save when dialog is dismissed (e.g., Back key or touching outside)
dialog.setOnDismissListener {
val content = etMemo.text.toString().trim()
lifecycleScope.launch {
repo.setMemo(date, content)
updateCalendar()
dialog.dismiss()
}
}
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) {
+41 -14
View File
@@ -7,6 +7,12 @@
app:cardElevation="8dp"
app:cardBackgroundColor="@android:color/transparent">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -20,8 +26,8 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:paddingTop="8dp"
android:paddingBottom="20dp">
android:paddingTop="4dp"
android:paddingBottom="16dp">
<TextView
android:id="@+id/dialogSubtitle"
@@ -105,23 +111,23 @@
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/grid_divider"
android:layout_marginTop="20dp"/>
android:layout_marginTop="16dp"/>
<!-- Memo Section -->
<!-- Memo Section with Quick Save Bar -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="16dp"
android:layout_marginTop="12dp"
android:background="@drawable/bg_glass_button_light"
android:padding="16dp">
android:padding="14dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_marginBottom="12dp">
android:layout_marginBottom="8dp">
<TextView
android:id="@+id/memoTitle"
@@ -139,15 +145,35 @@
android:layout_height="28dp"
android:src="@drawable/ic_delete"
app:tint="@color/shift_red"
android:padding="6dp"
android:background="?attr/selectableItemBackgroundBorderless"/>
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="여기에 메모를 입력하세요"
android:hint="여기에 메모를 입력하세요 (최대 4줄)"
android:inputType="textMultiLine|textNoSuggestions"
android:minLines="2"
android:maxLines="4"
@@ -155,21 +181,22 @@
android:textSize="15sp"
android:textColor="@color/text_primary"
android:background="@android:color/transparent"
android:padding="0dp"/>
android:padding="2dp"/>
</LinearLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/btnClose"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_height="52dp"
android:text="저장 및 닫기"
android:layout_marginTop="24dp"
android:layout_marginTop="16dp"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="#FFFFFF"
app:cornerRadius="28dp"
app:cornerRadius="26dp"
android:backgroundTint="@color/primary"
android:elevation="2dp"/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.cardview.widget.CardView>
+13 -17
View File
@@ -6,21 +6,17 @@ import shutil
token = "e3b515eaa0a6683c921ca3bf718e281ed30a6075"
owner_repo = "sanjeok77/ShiftRing"
tag = "v1.1.1"
title = "v1.1.1 - 전체 알람 온오프 스위치 및 해제 시 경고 팝업 적용, 앱 정보 화면 바운스 수정, 데이터 초기화 4단계 세분화"
body = """## 🚀 ShiftRing v1.1.1 릴리즈
tag = "v1.1.2"
title = "v1.1.2 - 하루 메모 키보드 가림 완벽 개선 (상단 즉시 저장 버튼, 뒤로가기 시 자동 저장 및 스크롤 지원)"
body = """## 🚀 ShiftRing v1.1.2 릴리즈
### 🌟 주요 변경 및 개선 사항
1. **🔘 전체 알람 온/오프 스위치 UI 도입 및 안전 끄기 모달 팝업 (`fragment_settings_alarm.xml`, `FragmentSettingsAlarm.kt`)**:
- 기존 텍스트 터치 방식에서 그룹 알람과 동일한 원터치 머티리얼 스위치(`MaterialSwitch`) 카드로 개편
- 알람을 끌 때는 "전체 알람을 끄시겠습니까? 모든 교대근무 알람이 울리지 않게 됩니다." 경고 다이얼로그(확인/취소)를 띄워 오동작을 방지
2. **🛡️ 시스템 전체 권한 설정 진입 시 즉시 튕겨 돌아오던 현상 수정 (`FragmentSettingsBasic.kt`, `AlarmPermissionUtil.kt`)**:
- 앱 상세 정보 열람 화면에는 자동 복귀 타이머를 배제하고, 개별 권한 설정 시에도 미허용 상태일 때만 지능적으로 동작하도록 개선
3. **🧹 데이터 초기화 4단계 정밀 세분화 (`fragment_settings_additional.xml`, `FragmentSettingsAdditional.kt`)**:
- **개별 근무/알람 설정 전체 삭제**: 달력 개별 변경 내역 초기화
- **개별 근무 삭제**: 변경된 교대근무 일정만 복원
- **알람 삭제**: 추가된 커스텀 알람 삭제 및 기본 복원
- **전체 삭제**: 메모, 연차, 근무, 알람 등 전체 앱 데이터 완전 초기화"""
1. **📝 하루 메모 입력창 상단 '즉시 저장' 버튼 탑재 (`dialog_day_settings.xml`, `MainActivity.kt`)**:
- 가상 키보드가 올라와도 항상 키보드 바로 위에 노출되는 메모 섹션 상단에 파란색 [저장] 액션 버튼을 신설하여 키보드를 내리지 않고도 원터치로 즉시 저장 가능
2. **🔄 뒤로가기/바깥 터치 시 메모 자동 저장(Auto-Save) 기능 구현 (`MainActivity.kt`)**:
- 사용자가 백키(Back)를 누르거나 팝업 바깥을 터치하여 닫더라도 작성 중이던 메모 내용이 Room DB에 100% 자동 저장되어 내용 유실을 원천 방지
3. **📜 다이얼로그 전체 스크롤 및 가상 키보드 동적 리사이징 지원 (`dialog_day_settings.xml`, `MainActivity.kt`)**:
- `NestedScrollView` 및 `SOFT_INPUT_ADJUST_RESIZE`를 적용하여 4줄 메모를 입력하더라도 화면이 잘리지 않고 부드럽게 스크롤되도록 개선"""
apk_path = "app/build/outputs/apk/release/app-release.apk"
if not os.path.exists(apk_path):
@@ -58,10 +54,10 @@ print("Updated app.apk at project root.")
# Update version.json
v_info = {
"versionCode": 111,
"versionName": "1.1.1",
"versionCode": 112,
"versionName": "1.1.2",
"apkUrl": direct_url,
"changelog": "v1.1.1: 전체 알람 스위치 및 경고 팝업, 앱 상세설정 바운스 수정, 데이터 초기화 4단계 세분화",
"changelog": "v1.1.2: 하루 메모 키보드 가림 완벽 개선 (상단 즉시 저장 버튼, 뒤로가기 자동 저장, 스크롤 지원)",
"forceUpdate": False
}
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"
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", "commit", "-m", commit_msg], check=True)
subprocess.run(["git", "push", "origin", "main"], check=True)
+4 -4
View File
@@ -1,7 +1,7 @@
{
"versionCode": 111,
"versionName": "1.1.1",
"apkUrl": "https://git.webpluss.net/attachments/338d4f1c-3253-4de6-8632-0232bc1ce7a9",
"changelog": "v1.1.1: 전체 알람 스위치 및 경고 팝업, 앱 상세설정 바운스 수정, 데이터 초기화 4단계 세분화",
"versionCode": 112,
"versionName": "1.1.2",
"apkUrl": "https://git.webpluss.net/attachments/0232d016-9a38-413e-96a8-4bea1138b645",
"changelog": "v1.1.2: 하루 메모 키보드 가림 완벽 개선 (상단 즉시 저장 버튼, 뒤로가기 자동 저장, 스크롤 지원)",
"forceUpdate": false
}