Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d993619ff8 | ||
|
|
d012b178b7 | ||
|
|
a356b3c581 | ||
|
|
2f7361bbc9 |
@@ -20,8 +20,8 @@ android {
|
|||||||
applicationId = "com.example.shiftalarm"
|
applicationId = "com.example.shiftalarm"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 108
|
versionCode = 112
|
||||||
versionName = "1.0.8"
|
versionName = "1.1.2"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||||
<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" />
|
||||||
@@ -93,6 +94,16 @@
|
|||||||
android:foregroundServiceType="mediaPlayback"
|
android:foregroundServiceType="mediaPlayback"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
|
||||||
|
<provider
|
||||||
|
android:name="androidx.core.content.FileProvider"
|
||||||
|
android:authorities="${applicationId}.provider"
|
||||||
|
android:exported="false"
|
||||||
|
android:grantUriPermissions="true">
|
||||||
|
<meta-data
|
||||||
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||||
|
android:resource="@xml/provider_paths" />
|
||||||
|
</provider>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@@ -29,9 +29,10 @@ object AlarmPermissionUtil {
|
|||||||
fun monitorAndAutoReturn(activity: Activity, isGrantedCheck: () -> Boolean) {
|
fun monitorAndAutoReturn(activity: Activity, isGrantedCheck: () -> Boolean) {
|
||||||
monitorJob?.cancel()
|
monitorJob?.cancel()
|
||||||
monitorJob = CoroutineScope(Dispatchers.Main).launch {
|
monitorJob = CoroutineScope(Dispatchers.Main).launch {
|
||||||
|
delay(1000) // 설정 화면 전환 시간 대기
|
||||||
var count = 0
|
var count = 0
|
||||||
while (count < 150 && isActive) { // 최대 60초간 400ms 주기로 체크
|
while (count < 150 && isActive) { // 최대 60초간 500ms 주기로 체크
|
||||||
delay(400)
|
delay(500)
|
||||||
count++
|
count++
|
||||||
if (isGrantedCheck()) {
|
if (isGrantedCheck()) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -108,16 +108,7 @@ object AppUpdateManager {
|
|||||||
|
|
||||||
btnNow.setOnClickListener {
|
btnNow.setOnClickListener {
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
try {
|
downloadAndInstallApk(activity, apkUrl, version)
|
||||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(apkUrl)).apply {
|
|
||||||
flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
|
||||||
}
|
|
||||||
activity.startActivity(intent)
|
|
||||||
Toast.makeText(activity, "최신 버전 다운로드 페이지로 이동합니다.", Toast.LENGTH_SHORT).show()
|
|
||||||
} catch (e: Exception) {
|
|
||||||
e.printStackTrace()
|
|
||||||
Toast.makeText(activity, "다운로드 링크 열기 실패: ${e.message}", Toast.LENGTH_SHORT).show()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog.show()
|
dialog.show()
|
||||||
@@ -125,4 +116,100 @@ object AppUpdateManager {
|
|||||||
val width = (activity.resources.displayMetrics.widthPixels * 0.88).toInt()
|
val width = (activity.resources.displayMetrics.widthPixels * 0.88).toInt()
|
||||||
dialog.window?.setLayout(width, android.view.ViewGroup.LayoutParams.WRAP_CONTENT)
|
dialog.window?.setLayout(width, android.view.ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun downloadAndInstallApk(activity: Activity, apkUrl: String, version: String) {
|
||||||
|
if (activity.isFinishing || activity.isDestroyed) return
|
||||||
|
|
||||||
|
val view = LayoutInflater.from(activity).inflate(R.layout.dialog_update_progress_oneui, null)
|
||||||
|
val tvSub = view.findViewById<TextView>(R.id.tvProgressSub)
|
||||||
|
val progressBar = view.findViewById<ProgressBar>(R.id.downloadProgressBar)
|
||||||
|
val tvPercent = view.findViewById<TextView>(R.id.tvProgressPercent)
|
||||||
|
|
||||||
|
tvSub.text = "v$version 다운로드 중..."
|
||||||
|
|
||||||
|
val progressDialog = AlertDialog.Builder(activity)
|
||||||
|
.setView(view)
|
||||||
|
.setCancelable(false)
|
||||||
|
.create()
|
||||||
|
|
||||||
|
progressDialog.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
||||||
|
progressDialog.show()
|
||||||
|
|
||||||
|
val width = (activity.resources.displayMetrics.widthPixels * 0.88).toInt()
|
||||||
|
progressDialog.window?.setLayout(width, android.view.ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||||
|
|
||||||
|
Thread {
|
||||||
|
try {
|
||||||
|
val url = URL(apkUrl)
|
||||||
|
val connection = url.openConnection() as HttpURLConnection
|
||||||
|
connection.connectTimeout = 15000
|
||||||
|
connection.readTimeout = 15000
|
||||||
|
connection.requestMethod = "GET"
|
||||||
|
connection.connect()
|
||||||
|
|
||||||
|
val fileLength = connection.contentLength
|
||||||
|
val inputStream = BufferedInputStream(connection.inputStream)
|
||||||
|
|
||||||
|
val apkFile = File(activity.cacheDir, "update.apk")
|
||||||
|
val outputStream = FileOutputStream(apkFile)
|
||||||
|
|
||||||
|
val buffer = ByteArray(8192)
|
||||||
|
var total: Long = 0
|
||||||
|
var count: Int
|
||||||
|
|
||||||
|
while (inputStream.read(buffer).also { count = it } != -1) {
|
||||||
|
total += count
|
||||||
|
outputStream.write(buffer, 0, count)
|
||||||
|
|
||||||
|
if (fileLength > 0) {
|
||||||
|
val progress = (total * 100 / fileLength).toInt()
|
||||||
|
activity.runOnUiThread {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
|
progressBar.setProgress(progress, true)
|
||||||
|
} else {
|
||||||
|
progressBar.progress = progress
|
||||||
|
}
|
||||||
|
tvPercent.text = "$progress%"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
outputStream.flush()
|
||||||
|
outputStream.close()
|
||||||
|
inputStream.close()
|
||||||
|
connection.disconnect()
|
||||||
|
|
||||||
|
activity.runOnUiThread {
|
||||||
|
progressDialog.dismiss()
|
||||||
|
installApk(activity, apkFile)
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
activity.runOnUiThread {
|
||||||
|
progressDialog.dismiss()
|
||||||
|
Toast.makeText(activity, "다운로드 실패: ${e.message}", Toast.LENGTH_LONG).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}.start()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun installApk(activity: Activity, apkFile: File) {
|
||||||
|
try {
|
||||||
|
val apkUri = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
|
FileProvider.getUriForFile(activity, "${activity.packageName}.provider", apkFile)
|
||||||
|
} else {
|
||||||
|
Uri.fromFile(apkFile)
|
||||||
|
}
|
||||||
|
|
||||||
|
val intent = Intent(Intent.ACTION_VIEW).apply {
|
||||||
|
setDataAndType(apkUri, "application/vnd.android.package-archive")
|
||||||
|
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_GRANT_READ_URI_PERMISSION
|
||||||
|
}
|
||||||
|
activity.startActivity(intent)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
Toast.makeText(activity, "설치 실패: ${e.message}", Toast.LENGTH_LONG).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -233,46 +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 {
|
||||||
|
val isAlreadyGranted = AlarmPermissionUtil.getBatteryOptimizationStatus(requireContext())
|
||||||
AlarmPermissionUtil.requestBatteryOptimization(requireActivity())
|
AlarmPermissionUtil.requestBatteryOptimization(requireActivity())
|
||||||
AlarmPermissionUtil.monitorAndAutoReturn(requireActivity()) {
|
if (!isAlreadyGranted) {
|
||||||
AlarmPermissionUtil.getBatteryOptimizationStatus(requireContext())
|
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}")
|
||||||
}
|
}
|
||||||
requireActivity().startActivity(intent)
|
requireActivity().startActivity(intent)
|
||||||
AlarmPermissionUtil.monitorAndAutoReturn(requireActivity()) {
|
if (!isAlreadyGranted) {
|
||||||
AlarmPermissionUtil.getExactAlarmStatus(requireContext())
|
AlarmPermissionUtil.monitorAndAutoReturn(requireActivity()) {
|
||||||
|
AlarmPermissionUtil.getExactAlarmStatus(requireContext())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.btnOverlayPermission.setOnClickListener {
|
binding.btnOverlayPermission.setOnClickListener {
|
||||||
|
val isAlreadyGranted = AlarmPermissionUtil.getOverlayStatus(requireContext())
|
||||||
AlarmPermissionUtil.requestOverlayPermission(requireActivity())
|
AlarmPermissionUtil.requestOverlayPermission(requireActivity())
|
||||||
AlarmPermissionUtil.monitorAndAutoReturn(requireActivity()) {
|
if (!isAlreadyGranted) {
|
||||||
AlarmPermissionUtil.getOverlayStatus(requireContext())
|
AlarmPermissionUtil.monitorAndAutoReturn(requireActivity()) {
|
||||||
|
AlarmPermissionUtil.getOverlayStatus(requireContext())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.btnFullScreenIntent.setOnClickListener {
|
binding.btnFullScreenIntent.setOnClickListener {
|
||||||
|
val isAlreadyGranted = AlarmPermissionUtil.getFullScreenIntentStatus(requireContext())
|
||||||
AlarmPermissionUtil.requestFullScreenIntentPermission(requireActivity())
|
AlarmPermissionUtil.requestFullScreenIntentPermission(requireActivity())
|
||||||
AlarmPermissionUtil.monitorAndAutoReturn(requireActivity()) {
|
if (!isAlreadyGranted) {
|
||||||
AlarmPermissionUtil.getFullScreenIntentStatus(requireContext())
|
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}")
|
||||||
}
|
}
|
||||||
requireActivity().startActivity(intent)
|
requireActivity().startActivity(intent)
|
||||||
AlarmPermissionUtil.monitorAndAutoReturn(requireActivity()) {
|
|
||||||
AlarmPermissionUtil.isAllPermissionsGranted(requireContext())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.btnCheckUpdate.setOnClickListener {
|
binding.btnCheckUpdate.setOnClickListener {
|
||||||
|
|||||||
@@ -63,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
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -659,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 {
|
||||||
@@ -669,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) {
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
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="4dp"
|
||||||
android:paddingBottom="16dp"
|
android:paddingBottom="8dp"
|
||||||
android:paddingStart="24dp"
|
android:paddingStart="24dp"
|
||||||
android:paddingEnd="24dp"
|
android:paddingEnd="24dp"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
|||||||
@@ -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">
|
|
||||||
|
<!-- 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
|
<!-- 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>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
@@ -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) -->
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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>
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
+13
-14
@@ -6,18 +6,17 @@ import shutil
|
|||||||
|
|
||||||
token = "e3b515eaa0a6683c921ca3bf718e281ed30a6075"
|
token = "e3b515eaa0a6683c921ca3bf718e281ed30a6075"
|
||||||
owner_repo = "sanjeok77/ShiftRing"
|
owner_repo = "sanjeok77/ShiftRing"
|
||||||
tag = "v1.0.8"
|
tag = "v1.1.2"
|
||||||
title = "v1.0.8 - 시스템 권한 설정 토글 시 앱 자동 즉시 복귀, 달력 상단 근무 텍스트 컬러화 및 최신 버전 확인 아이콘 개편"
|
title = "v1.1.2 - 하루 메모 키보드 가림 완벽 개선 (상단 즉시 저장 버튼, 뒤로가기 시 자동 저장 및 스크롤 지원)"
|
||||||
body = """## 🚀 ShiftRing v1.0.8 릴리즈
|
body = """## 🚀 ShiftRing v1.1.2 릴리즈
|
||||||
|
|
||||||
### 🌟 주요 변경 및 개선 사항
|
### 🌟 주요 변경 및 개선 사항
|
||||||
1. **🔄 시스템 권한 설정 시 '뒤로가기 없이' 앱 즉시 자동 복귀 (`AlarmPermissionUtil.kt`, `FragmentSettingsBasic.kt`)**:
|
1. **📝 하루 메모 입력창 상단 '즉시 저장' 버튼 탑재 (`dialog_day_settings.xml`, `MainActivity.kt`)**:
|
||||||
- 전체화면 알림, 정확한 알람, 배터리 최적화 등 시스템 설정 화면에서 권한 토글을 켜면 앱이 실시간으로 권한 부여를 감지하여 뒤로가기를 누르지 않아도 즉각 ShiftRing 앱 화면으로 자동 복귀하도록 구현
|
- 가상 키보드가 올라와도 항상 키보드 바로 위에 노출되는 메모 섹션 상단에 파란색 [저장] 액션 버튼을 신설하여 키보드를 내리지 않고도 원터치로 즉시 저장 가능
|
||||||
2. **🏷️ 달력 상단 '오늘의 근무' 레이블 및 색상 정밀 개편 (`MainActivity.kt`)**:
|
2. **🔄 뒤로가기/바깥 터치 시 메모 자동 저장(Auto-Save) 기능 구현 (`MainActivity.kt`)**:
|
||||||
- 불필요하던 `(내 반)` 텍스트를 완전히 제거
|
- 사용자가 백키(Back)를 누르거나 팝업 바깥을 터치하여 닫더라도 작성 중이던 메모 내용이 Room DB에 100% 자동 저장되어 내용 유실을 원천 방지
|
||||||
- `오늘의 근무: 휴무`, `오늘의 근무: 주간` 등의 텍스트에서 근무 명칭(휴무, 주간, 석간, 야간 등)에 고유의 근무 색상(빨강, 노랑, 청록, 검정 등) 및 볼드 스타일을 정밀하게 적용
|
3. **📜 다이얼로그 전체 스크롤 및 가상 키보드 동적 리사이징 지원 (`dialog_day_settings.xml`, `MainActivity.kt`)**:
|
||||||
3. **🔄 기본 설정 탭 '최신 버전 확인' 아이콘 전면 개편 (`fragment_settings_basic.xml`, `ic_update.xml`)**:
|
- `NestedScrollView` 및 `SOFT_INPUT_ADJUST_RESIZE`를 적용하여 4줄 메모를 입력하더라도 화면이 잘리지 않고 부드럽게 스크롤되도록 개선"""
|
||||||
- 기존 벨 아이콘 대신 전용 업데이트/동기화 벡터 아이콘(`ic_update`, 인디고 `#5856D6`)을 적용하여 설정 UI 일관성 완성"""
|
|
||||||
|
|
||||||
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):
|
||||||
@@ -55,10 +54,10 @@ print("Updated app.apk at project root.")
|
|||||||
|
|
||||||
# Update version.json
|
# Update version.json
|
||||||
v_info = {
|
v_info = {
|
||||||
"versionCode": 108,
|
"versionCode": 112,
|
||||||
"versionName": "1.0.8",
|
"versionName": "1.1.2",
|
||||||
"apkUrl": direct_url,
|
"apkUrl": direct_url,
|
||||||
"changelog": "v1.0.8: 권한 설정 시 앱 자동 복귀, 달력 상단 근무 색상 적용, 최신 버전 확인 아이콘 개편",
|
"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:
|
||||||
@@ -70,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.0.8 - 시스템 권한 설정 토글 시 앱 자동 즉시 복귀, 달력 상단 근무 텍스트 컬러화 및 최신 버전 확인 아이콘 개편"
|
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
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"versionCode": 108,
|
"versionCode": 112,
|
||||||
"versionName": "1.0.8",
|
"versionName": "1.1.2",
|
||||||
"apkUrl": "https://git.webpluss.net/attachments/184d5d36-cd76-4505-af83-abe97534f62f",
|
"apkUrl": "https://git.webpluss.net/attachments/0232d016-9a38-413e-96a8-4bea1138b645",
|
||||||
"changelog": "v1.0.8: 권한 설정 시 앱 자동 복귀, 달력 상단 근무 색상 적용, 최신 버전 확인 아이콘 개편",
|
"changelog": "v1.1.2: 하루 메모 키보드 가림 완벽 개선 (상단 즉시 저장 버튼, 뒤로가기 자동 저장, 스크롤 지원)",
|
||||||
"forceUpdate": false
|
"forceUpdate": false
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user