4 Commits

Author SHA1 Message Date
sanjeok77 cce9c48345 fix: 애니메이션 개선 및 APK 업데이트
- ViewPropertyAnimator 사용으로 더 부드러운 전환
- alpha 애니메이션 추가로 시각적 효과 개선
- APK URL 업데이트

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-13 00:50:38 +09:00
sanjeok77 7462656c15 feat: 달력 월 이동 시 부드러운 화면 전환 애니메이션 추가
- 월 이동 버튼 클릭 시 슬라이드 애니메이션 적용
- 설정 화면 탭 전환처럼 부드러운 전환 효과
- 버전 업데이트 v1.4.8 (1148)

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-13 00:48:11 +09:00
sanjeok77 30b150bb81 fix: 버전업 오류 수정 및 UI 개선
- 난부 버전 1147 (1.4.7)로 업데이트 (중복 버전 코드 제거)
- 휴가 관리 탭 → 근무 관리로 명칭 변경
- 남은 연차 하단에 '기능추가중' 표시 추가

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-13 00:34:35 +09:00
sanjeok77 f586d74759 fix: 휴가관리 UI 정리 및 자동 저장 기능 추가
- 중복된 '연차: -1일 / 반년: -0.5일 차감' 텍스트 제거
- 중복된 Spinner/NumberPicker 뷰 정리
- 저장 버튼 제거하고 Spinner 선택 시 자동 저장되도록 개선
- 버전 업데이트 v1.4.6 (1146)

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-13 00:27:42 +09:00
12 changed files with 98 additions and 85 deletions
+12
View File
@@ -0,0 +1,12 @@
# 로컬 설정 파일
## Personal Access Token (Gitea)
- 토큰: `e3b515eaa0a6683c921ca3bf718e281ed30a6075`
- 용도: git.webpluss.net API 접근 (Release 업로드, version.json 업데이트)
- **Git에 Commit되지 않도록 주의**
## 사용 예시
```bash
curl -u "sanjeok77:e3b515eaa0a6683c921ca3bf718e281ed30a6075" \
"https://git.webpluss.net/api/v1/repos/sanjeok77/NeFLIX/releases"
```
Binary file not shown.
BIN
View File
Binary file not shown.
+2 -4
View File
@@ -20,10 +20,8 @@ android {
applicationId = "com.example.shiftalarm" applicationId = "com.example.shiftalarm"
minSdk = 26 minSdk = 26
targetSdk = 35 targetSdk = 35
versionCode = 1144 versionCode = 1148
versionName = "1.4.4" versionName = "1.4.8"
versionCode = 1145
versionName = "1.4.5"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
} }
@@ -35,27 +35,6 @@ fun showCustomToast(context: Context, message: String, duration: Int = android.w
// Fallback to default toast if custom toast fails // Fallback to default toast if custom toast fails
android.widget.Toast.makeText(context, message, duration).show() android.widget.Toast.makeText(context, message, duration).show()
} }
}
* 다크모드 지원 커스텀 토스트 표시
*/
fun showCustomToast(context: Context, message: String, duration: Int = android.widget.Toast.LENGTH_SHORT) {
try {
// Use application context with theme for proper dark mode support
val themedContext = android.view.ContextThemeWrapper(context.applicationContext, R.style.Theme_ShiftAlarm)
val inflater = android.view.LayoutInflater.from(themedContext)
val layout = inflater.inflate(R.layout.custom_toast, null)
val textView = layout.findViewById<android.widget.TextView>(R.id.toastText)
textView.text = message
val toast = android.widget.Toast(context.applicationContext)
toast.duration = duration
toast.view = layout
toast.setGravity(android.view.Gravity.BOTTOM or android.view.Gravity.CENTER_HORIZONTAL, 0, 100)
toast.show()
} catch (e: Exception) {
// Fallback to default toast if custom toast fails
android.widget.Toast.makeText(context, message, duration).show()
}
} }
// ============================================ // ============================================
// 알람 ID 생성 // 알람 ID 생성
@@ -4,16 +4,19 @@ import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.AdapterView
import android.widget.ArrayAdapter import android.widget.ArrayAdapter
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
import com.example.shiftalarm.databinding.FragmentSettingsLabBinding import com.example.shiftalarm.databinding.FragmentSettingsLabBinding
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.delay
class FragmentSettingsLab : Fragment() { class FragmentSettingsLab : Fragment() {
private var _binding: FragmentSettingsLabBinding? = null private var _binding: FragmentSettingsLabBinding? = null
private val binding get() = _binding!! private val binding get() = _binding!!
private var isInitialLoad = true
override fun onCreateView( override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, inflater: LayoutInflater, container: ViewGroup?,
@@ -28,7 +31,6 @@ class FragmentSettingsLab : Fragment() {
setupSpinner() setupSpinner()
loadAnnualLeave() loadAnnualLeave()
setupSaveButton()
} }
private fun setupSpinner() { private fun setupSpinner() {
@@ -37,10 +39,25 @@ class FragmentSettingsLab : Fragment() {
val adapter = ArrayAdapter(requireContext(), android.R.layout.simple_spinner_item, daysList) val adapter = ArrayAdapter(requireContext(), android.R.layout.simple_spinner_item, daysList)
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item) adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
binding.spinnerTotalDays.adapter = adapter binding.spinnerTotalDays.adapter = adapter
// 선택 시 자동 저장
binding.spinnerTotalDays.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
if (!isInitialLoad) {
val totalDays = position + 1 // 0-indexed to actual days
saveAnnualLeave(totalDays)
}
}
override fun onNothingSelected(parent: AdapterView<*>?) {
// Do nothing
}
}
} }
private fun loadAnnualLeave() { private fun loadAnnualLeave() {
lifecycleScope.launch { lifecycleScope.launch {
isInitialLoad = true
val repo = ShiftRepository(requireContext()) val repo = ShiftRepository(requireContext())
val annualLeave = repo.getAnnualLeave() val annualLeave = repo.getAnnualLeave()
@@ -53,24 +70,23 @@ class FragmentSettingsLab : Fragment() {
binding.spinnerTotalDays.setSelection(14) binding.spinnerTotalDays.setSelection(14)
binding.tvRemainingDays.text = "15" binding.tvRemainingDays.text = "15"
} }
// 초기 로드 완료 후 플래그 변경 (약간의 딜레이로 초기 선택 이벤트 방지)
delay(300)
isInitialLoad = false
} }
} }
private fun setupSaveButton() { private fun saveAnnualLeave(totalDays: Int) {
binding.btnSaveAnnualLeave.setOnClickListener { lifecycleScope.launch {
val selectedPosition = binding.spinnerTotalDays.selectedItemPosition val repo = ShiftRepository(requireContext())
val totalDays = selectedPosition + 1 // 0-indexed to actual days
lifecycleScope.launch { repo.recalculateAndSaveAnnualLeave(totalDays.toFloat())
val repo = ShiftRepository(requireContext())
val updated = repo.getAnnualLeave()
repo.recalculateAndSaveAnnualLeave(totalDays.toFloat()) updated?.let {
binding.tvRemainingDays.text = formatRemainingDays(it.remainingDays)
val updated = repo.getAnnualLeave() showCustomToast(requireContext(), "총 연차 ${totalDays}일로 저장되었습니다 (남은 연차: ${formatRemainingDays(it.remainingDays)}일)")
updated?.let {
binding.tvRemainingDays.text = formatRemainingDays(it.remainingDays)
showCustomToast(requireContext(), "총 연차 ${totalDays}일로 저장되었습니다 (남은 연차: ${formatRemainingDays(it.remainingDays)}일)")
}
} }
} }
} }
@@ -80,8 +80,7 @@ class MainActivity : AppCompatActivity() {
} }
binding.prevMonth.setOnClickListener { binding.prevMonth.setOnClickListener {
currentViewMonth = currentViewMonth.minusMonths(1) animateMonthTransition(-1)
updateCalendar()
} }
binding.monthTitle.setOnClickListener { binding.monthTitle.setOnClickListener {
@@ -89,8 +88,7 @@ class MainActivity : AppCompatActivity() {
} }
binding.nextMonth.setOnClickListener { binding.nextMonth.setOnClickListener {
currentViewMonth = currentViewMonth.plusMonths(1) animateMonthTransition(1)
updateCalendar()
} }
binding.btnToday.setOnClickListener { binding.btnToday.setOnClickListener {
@@ -707,11 +705,42 @@ class MainActivity : AppCompatActivity() {
Toast.makeText(this, "⚠️ 루팅된 기기에서 시각적 오류나 알람 불안정이 발생할 수 있습니다.", Toast.LENGTH_LONG).show() Toast.makeText(this, "⚠️ 루팅된 기기에서 시각적 오류나 알람 불안정이 발생할 수 있습니다.", Toast.LENGTH_LONG).show()
} }
} }
/** private fun animateMonthTransition(direction: Int) {
* 남은 연차 표시 형식 개선 val card = binding.calendarCard
* - 정수면 정수로 표시 (예: 22) val width = card.width.toFloat()
* - 소숫점 있으면 소숫점 표시 (예: 21.5)
*/ if (width == 0f) {
currentViewMonth = if (direction > 0) {
currentViewMonth.plusMonths(1)
} else {
currentViewMonth.minusMonths(1)
}
updateCalendar()
return
}
card.animate()
.translationX(if (direction > 0) -width else width)
.alpha(0.5f)
.setDuration(200)
.withEndAction {
currentViewMonth = if (direction > 0) {
currentViewMonth.plusMonths(1)
} else {
currentViewMonth.minusMonths(1)
}
updateCalendar()
card.translationX = if (direction > 0) width else -width
card.animate()
.translationX(0f)
.alpha(1f)
.setDuration(200)
.start()
}
.start()
}
private fun formatRemainingDays(days: Float): String { private fun formatRemainingDays(days: Float): String {
return if (days == days.toInt().toFloat()) { return if (days == days.toInt().toFloat()) {
// 정수인 경우 // 정수인 경우
@@ -108,11 +108,4 @@ class ShiftRepository(private val context: Context) {
)) ))
} }
} }
val annualLeave = dao.getAnnualLeave()
annualLeave?.let {
val usedDays = calculateUsedAnnualLeave()
val remainingDays = it.totalDays - usedDays
dao.insertAnnualLeave(it.copy(remainingDays = remainingDays))
}
}
} }
@@ -15,13 +15,13 @@
android:textSize="18sp" android:textSize="18sp"
android:textStyle="bold" android:textStyle="bold"
android:textColor="@color/text_primary" android:textColor="@color/text_primary"
android:layout_marginBottom="16dp"/> android:layout_marginBottom="24dp"/>
<!-- Total Annual Leave Setting --> <!-- Total Annual Leave Setting -->
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="12dp" android:layout_marginBottom="16dp"
app:cardCornerRadius="12dp" app:cardCornerRadius="12dp"
app:cardElevation="2dp" app:cardElevation="2dp"
app:cardBackgroundColor="@color/surface"> app:cardBackgroundColor="@color/surface">
@@ -30,7 +30,7 @@
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:padding="12dp" android:padding="16dp"
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
@@ -51,9 +51,6 @@
android:id="@+id/spinnerTotalDays" android:id="@+id/spinnerTotalDays"
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="48dp"/> android:layout_height="48dp"/>
android:id="@+id/npTotalDays"
android:layout_width="60dp"
android:layout_height="100dp"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -70,7 +67,7 @@
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="12dp" android:layout_marginBottom="16dp"
app:cardCornerRadius="12dp" app:cardCornerRadius="12dp"
app:cardElevation="2dp" app:cardElevation="2dp"
app:cardBackgroundColor="@color/surface"> app:cardBackgroundColor="@color/surface">
@@ -79,7 +76,7 @@
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:padding="12dp" android:padding="16dp"
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
@@ -126,25 +123,14 @@
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:gravity="center"/> android:gravity="center"/>
<!-- Calculation Info --> <!-- 기능추가중 Notice -->
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="※ 연차: -1일 / 반년: -0.5일 차감" android:text="기능추가중"
android:textSize="12sp" android:textSize="11sp"
android:textColor="@color/text_tertiary" android:textColor="@color/primary"
android:layout_marginBottom="24dp" android:layout_marginBottom="24dp"
android:gravity="center"/> android:gravity="center"/>
<!-- Save Button -->
<com.google.android.material.button.MaterialButton
android:id="@+id/btnSaveAnnualLeave"
android:layout_width="match_parent"
android:layout_height="56dp"
android:text="저장"
android:textSize="16sp"
android:textStyle="bold"
app:cornerRadius="12dp"
android:backgroundTint="@color/primary"/>
</LinearLayout> </LinearLayout>
+1 -1
View File
@@ -40,7 +40,7 @@
android:id="@+id/shiftChar" android:id="@+id/shiftChar"
android:layout_width="48dp" android:layout_width="48dp"
android:layout_height="48dp" android:layout_height="48dp"
android:layout_height="40dp"
android:gravity="center" android:gravity="center"
android:text="주" android:text="주"
android:textSize="15sp" android:textSize="15sp"
+1 -1
View File
@@ -9,7 +9,7 @@
<string name="tab_basic">기본 설정</string> <string name="tab_basic">기본 설정</string>
<string name="tab_alarm">알람 설정</string> <string name="tab_alarm">알람 설정</string>
<string name="tab_additional">부가기능</string> <string name="tab_additional">부가기능</string>
<string name="tab_lab">휴가 관리</string> <string name="tab_lab">근무 관리</string>
<string-array name="factory_array"> <string-array name="factory_array">
<item>전주</item> <item>전주</item>
+4 -4
View File
@@ -1,7 +1,7 @@
{ {
"versionCode": 1145, "versionCode": 1148,
"versionName": "1.4.5", "versionName": "1.4.8",
"apkUrl": "https://git.webpluss.net/attachments/aeb7b079-f81b-4c77-b8ee-b8fde90a530e", "apkUrl": "https://git.webpluss.net/attachments/b84726d9-cebb-4ffe-a452-6f0aefbcce93",
"changelog": "v1.4.5: 연차 최초적용 수정, 휴가관리 Spinner 변경, 동그라미 크기 확대", "changelog": "v1.4.8: 달력 월 이동 시 부드러운 화면 전환 애니메이션 추가",
"forceUpdate": false "forceUpdate": false
} }