Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f586d74759 | |||
| 608109e437 | |||
| 48cfbf3473 | |||
| 911ff3003f | |||
| 975c2cc9f6 | |||
| b5a6abee97 | |||
| fe050808b4 | |||
| 08c130f448 | |||
| 7d50263e65 | |||
| 693704686f |
@@ -20,8 +20,10 @@ android {
|
|||||||
applicationId = "com.example.shiftalarm"
|
applicationId = "com.example.shiftalarm"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 1143
|
versionCode = 1144
|
||||||
versionName = "1.4.3"
|
versionName = "1.4.4"
|
||||||
|
versionCode = 1145
|
||||||
|
versionName = "1.4.5"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.Toast
|
import android.widget.AdapterView
|
||||||
|
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?,
|
||||||
@@ -26,52 +29,82 @@ class FragmentSettingsLab : Fragment() {
|
|||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
setupNumberPicker()
|
setupSpinner()
|
||||||
loadAnnualLeave()
|
loadAnnualLeave()
|
||||||
setupSaveButton()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupNumberPicker() {
|
private fun setupSpinner() {
|
||||||
binding.npTotalDays.apply {
|
// 1~25일 선택 가능한 어댑터 설정
|
||||||
minValue = 1
|
val daysList = (1..25).map { "${it}일" }.toList()
|
||||||
maxValue = 25
|
val adapter = ArrayAdapter(requireContext(), android.R.layout.simple_spinner_item, daysList)
|
||||||
wrapSelectorWheel = false
|
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
|
||||||
|
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()
|
||||||
annualLeave?.let {
|
annualLeave?.let {
|
||||||
binding.npTotalDays.value = it.totalDays.toInt()
|
// 저장된 값이 있으면 해당 위치 선택 (0-indexed)
|
||||||
binding.tvRemainingDays.text = String.format("%.1f", it.remainingDays)
|
binding.spinnerTotalDays.setSelection(it.totalDays.toInt() - 1)
|
||||||
|
binding.tvRemainingDays.text = formatRemainingDays(it.remainingDays)
|
||||||
} ?: run {
|
} ?: run {
|
||||||
// Default: 15 days
|
// Default: 15 days (index 14)
|
||||||
binding.npTotalDays.value = 15
|
binding.spinnerTotalDays.setSelection(14)
|
||||||
binding.tvRemainingDays.text = "15.0"
|
binding.tvRemainingDays.text = "15"
|
||||||
|
}
|
||||||
|
|
||||||
|
// 초기 로드 완료 후 플래그 변경 (약간의 딜레이로 초기 선택 이벤트 방지)
|
||||||
|
delay(300)
|
||||||
|
isInitialLoad = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun saveAnnualLeave(totalDays: Int) {
|
||||||
|
lifecycleScope.launch {
|
||||||
|
val repo = ShiftRepository(requireContext())
|
||||||
|
|
||||||
|
repo.recalculateAndSaveAnnualLeave(totalDays.toFloat())
|
||||||
|
|
||||||
|
val updated = repo.getAnnualLeave()
|
||||||
|
updated?.let {
|
||||||
|
binding.tvRemainingDays.text = formatRemainingDays(it.remainingDays)
|
||||||
|
showCustomToast(requireContext(), "총 연차 ${totalDays}일로 저장되었습니다 (남은 연차: ${formatRemainingDays(it.remainingDays)}일)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupSaveButton() {
|
/**
|
||||||
binding.btnSaveAnnualLeave.setOnClickListener {
|
* 남은 연차 표시 형식 개선
|
||||||
val totalDays = binding.npTotalDays.value.toFloat()
|
* - 정수면 정수로 표시 (예: 22)
|
||||||
|
* - 소숫점 있으면 소숫점 표시 (예: 21.5)
|
||||||
lifecycleScope.launch {
|
*/
|
||||||
val repo = ShiftRepository(requireContext())
|
private fun formatRemainingDays(days: Float): String {
|
||||||
|
return if (days == days.toInt().toFloat()) {
|
||||||
repo.recalculateAndSaveAnnualLeave(totalDays)
|
// 정수인 경우
|
||||||
|
days.toInt().toString()
|
||||||
val updated = repo.getAnnualLeave()
|
} else {
|
||||||
updated?.let {
|
// 소숫점이 있는 경우 (0.5 등)
|
||||||
binding.tvRemainingDays.text = String.format("%.1f", it.remainingDays)
|
String.format("%.1f", days)
|
||||||
showCustomToast(requireContext(), "연차가 저장되었습니다. (남은 연차: ${String.format("%.1f", it.remainingDays)}일)")
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
|
|||||||
@@ -187,33 +187,33 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
val prefs = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
val prefs = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
||||||
currentViewTeam = prefs.getString(KEY_TEAM, "A") ?: "A"
|
currentViewTeam = prefs.getString(KEY_TEAM, "A") ?: "A"
|
||||||
|
|
||||||
updateTideButtonVisibility()
|
updateTideButtonVisibility()
|
||||||
updateCalendar()
|
updateCalendar()
|
||||||
|
|
||||||
// 일원화된 통합 권한 체크 실행 (신뢰도 100% 보장)
|
// 일원화된 통합 권한 체크 실행 (신뢰도 100% 보장)
|
||||||
AlarmPermissionUtil.checkAndRequestAllPermissions(this)
|
AlarmPermissionUtil.checkAndRequestAllPermissions(this)
|
||||||
|
|
||||||
// 설정 변경 시 즉시 반영을 위한 강제 동기화 (30일 스케줄링)
|
// 설정 변경 시 즉시 반영을 위한 강제 동기화 (30일 스케줄링)
|
||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
syncAllAlarms(this@MainActivity)
|
syncAllAlarms(this@MainActivity)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 연차 정보 업데이트
|
// 연차 정보 업데이트
|
||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
val repo = ShiftRepository(this@MainActivity)
|
val repo = ShiftRepository(this@MainActivity)
|
||||||
val annualLeave = repo.getAnnualLeave()
|
val annualLeave = repo.getAnnualLeave()
|
||||||
annualLeave?.let {
|
annualLeave?.let {
|
||||||
binding.tvAnnualLeave.text = "연차: ${String.format("%.1f", it.remainingDays)}"
|
binding.tvAnnualLeave.text = "연차: ${formatRemainingDays(it.remainingDays)}"
|
||||||
} ?: run {
|
} ?: run {
|
||||||
binding.tvAnnualLeave.text = "연차: --"
|
binding.tvAnnualLeave.text = "연차: --"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showMonthYearPicker() {
|
private fun showMonthYearPicker() {
|
||||||
val dialogView = layoutInflater.inflate(R.layout.dialog_month_year_picker, null)
|
val dialogView = layoutInflater.inflate(R.layout.dialog_month_year_picker, null)
|
||||||
@@ -325,17 +325,17 @@ class MainActivity : AppCompatActivity() {
|
|||||||
binding.todayStatusText.setTextColor(androidx.core.content.ContextCompat.getColor(this@MainActivity, R.color.warning_red))
|
binding.todayStatusText.setTextColor(androidx.core.content.ContextCompat.getColor(this@MainActivity, R.color.warning_red))
|
||||||
} else {
|
} else {
|
||||||
binding.todayStatusText.text = "오늘의 근무: $shiftForViewingTeam$teamSuffix"
|
binding.todayStatusText.text = "오늘의 근무: $shiftForViewingTeam$teamSuffix"
|
||||||
binding.todayStatusText.setTextColor(androidx.core.content.ContextCompat.getColor(this@MainActivity, R.color.text_secondary))
|
binding.todayStatusText.setTextColor(androidx.core.content.ContextCompat.getColor(this@MainActivity, R.color.text_secondary))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update Annual Leave display
|
// Update Annual Leave display
|
||||||
val annualLeave = withContext(Dispatchers.IO) { repo.getAnnualLeave() }
|
val annualLeave = withContext(Dispatchers.IO) { repo.getAnnualLeave() }
|
||||||
annualLeave?.let {
|
annualLeave?.let {
|
||||||
binding.tvAnnualLeave.text = "연차: ${String.format("%.1f", it.remainingDays)}"
|
binding.tvAnnualLeave.text = "연차: ${formatRemainingDays(it.remainingDays)}"
|
||||||
} ?: run {
|
} ?: run {
|
||||||
binding.tvAnnualLeave.text = "연차: --"
|
binding.tvAnnualLeave.text = "연차: --"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateOtherTeamsLayout(today, factory, prefs)
|
updateOtherTeamsLayout(today, factory, prefs)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -636,10 +636,11 @@ class MainActivity : AppCompatActivity() {
|
|||||||
else -> {
|
else -> {
|
||||||
// New Types: 월차, 연차, 반월, 반년, 교육 -> Saved as Override with no time
|
// New Types: 월차, 연차, 반월, 반년, 교육 -> Saved as Override with no time
|
||||||
repo.setOverride(date, selected, team, factory)
|
repo.setOverride(date, selected, team, factory)
|
||||||
|
// 연차 계산을 먼저 수행하고 달력 업데이트
|
||||||
|
repo.updateRemainingAnnualLeave()
|
||||||
updateCalendar()
|
updateCalendar()
|
||||||
syncAllAlarms(this)
|
syncAllAlarms(this)
|
||||||
android.widget.Toast.makeText(this, "${selected}(으)로 기록되었습니다. 알람이 해제됩니다.", android.widget.Toast.LENGTH_SHORT).show()
|
android.widget.Toast.makeText(this, "${selected}(으)로 기록되었습니다. 알람이 해제됩니다.", android.widget.Toast.LENGTH_SHORT).show()
|
||||||
repo.updateRemainingAnnualLeave()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -706,6 +707,18 @@ class MainActivity : AppCompatActivity() {
|
|||||||
Toast.makeText(this, "⚠️ 루팅된 기기에서 시각적 오류나 알람 불안정이 발생할 수 있습니다.", Toast.LENGTH_LONG).show()
|
Toast.makeText(this, "⚠️ 루팅된 기기에서 시각적 오류나 알람 불안정이 발생할 수 있습니다.", Toast.LENGTH_LONG).show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 남은 연차 표시 형식 개선
|
||||||
|
* - 정수면 정수로 표시 (예: 22)
|
||||||
|
* - 소숫점 있으면 소숫점 표시 (예: 21.5)
|
||||||
|
*/
|
||||||
|
private fun formatRemainingDays(days: Float): String {
|
||||||
|
return if (days == days.toInt().toFloat()) {
|
||||||
|
// 정수인 경우
|
||||||
|
days.toInt().toString()
|
||||||
|
} else {
|
||||||
|
// 소숫점이 있는 경우 (0.5 등)
|
||||||
|
String.format("%.1f", days)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,6 +93,21 @@ class ShiftRepository(private val context: Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
suspend fun updateRemainingAnnualLeave() {
|
suspend fun updateRemainingAnnualLeave() {
|
||||||
|
val annualLeave = dao.getAnnualLeave()
|
||||||
|
val usedDays = calculateUsedAnnualLeave()
|
||||||
|
|
||||||
|
if (annualLeave != null) {
|
||||||
|
val remainingDays = annualLeave.totalDays - usedDays
|
||||||
|
dao.insertAnnualLeave(annualLeave.copy(remainingDays = remainingDays))
|
||||||
|
} else {
|
||||||
|
// AnnualLeave가 없으면 기본값 15일로 생성
|
||||||
|
dao.insertAnnualLeave(AnnualLeave(
|
||||||
|
id = 1,
|
||||||
|
totalDays = 15f,
|
||||||
|
remainingDays = 15f - usedDays
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
val annualLeave = dao.getAnnualLeave()
|
val annualLeave = dao.getAnnualLeave()
|
||||||
annualLeave?.let {
|
annualLeave?.let {
|
||||||
val usedDays = calculateUsedAnnualLeave()
|
val usedDays = calculateUsedAnnualLeave()
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
android:id="@+id/calendarCard"
|
android:id="@+id/calendarCard"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_marginHorizontal="12dp"
|
android:layout_marginHorizontal="3dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
app:cardCornerRadius="28dp"
|
app:cardCornerRadius="28dp"
|
||||||
app:cardElevation="0dp"
|
app:cardElevation="0dp"
|
||||||
@@ -240,7 +240,7 @@
|
|||||||
android:id="@+id/otherTeamsCard"
|
android:id="@+id/otherTeamsCard"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="12dp"
|
android:layout_marginHorizontal="3dp"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
app:cardCornerRadius="20dp"
|
app:cardCornerRadius="20dp"
|
||||||
app:cardElevation="0dp"
|
app:cardElevation="0dp"
|
||||||
|
|||||||
@@ -1,135 +1,126 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fillViewport="true">
|
android:orientation="vertical"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:gravity="center_horizontal">
|
||||||
|
|
||||||
<LinearLayout
|
<!-- Header Title -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="나의 연차 설정"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/text_primary"
|
||||||
|
android:layout_marginBottom="24dp"/>
|
||||||
|
|
||||||
|
<!-- Total Annual Leave Setting -->
|
||||||
|
<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:orientation="vertical"
|
android:layout_marginBottom="16dp"
|
||||||
android:padding="24dp"
|
app:cardCornerRadius="12dp"
|
||||||
android:gravity="center_horizontal">
|
app:cardElevation="2dp"
|
||||||
|
app:cardBackgroundColor="@color/surface">
|
||||||
|
|
||||||
<!-- Header Title -->
|
<LinearLayout
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="나의 연차 설정"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="@color/text_primary"
|
|
||||||
android:layout_marginBottom="32dp"/>
|
|
||||||
|
|
||||||
<!-- Total Annual Leave Setting -->
|
|
||||||
<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="24dp"
|
android:orientation="horizontal"
|
||||||
app:cardCornerRadius="16dp"
|
android:padding="16dp"
|
||||||
app:cardElevation="4dp"
|
android:gravity="center_vertical">
|
||||||
app:cardBackgroundColor="@color/surface">
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="총 연차"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="@color/text_secondary"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="horizontal"
|
||||||
android:padding="24dp"
|
android:gravity="center_vertical">
|
||||||
android:gravity="center">
|
|
||||||
|
|
||||||
<TextView
|
<Spinner
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/spinnerTotalDays"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="80dp"
|
||||||
android:text="총 연차"
|
android:layout_height="48dp"/>
|
||||||
android:textSize="16sp"
|
|
||||||
android:textColor="@color/text_secondary"
|
|
||||||
android:layout_marginBottom="16dp"/>
|
|
||||||
|
|
||||||
<!-- NumberPicker for Total Days -->
|
|
||||||
<NumberPicker
|
|
||||||
android:id="@+id/npTotalDays"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="8dp"/>
|
|
||||||
|
|
||||||
<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="14sp"
|
android:textSize="14sp"
|
||||||
android:textColor="@color/text_tertiary"/>
|
android:textColor="@color/text_tertiary"
|
||||||
|
android:layout_marginStart="4dp"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
<!-- Remaining Annual Leave Display -->
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
app:cardCornerRadius="12dp"
|
||||||
|
app:cardElevation="2dp"
|
||||||
|
app:cardBackgroundColor="@color/surface">
|
||||||
|
|
||||||
<!-- Remaining Annual Leave Display -->
|
<LinearLayout
|
||||||
<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="32dp"
|
android:orientation="horizontal"
|
||||||
app:cardCornerRadius="16dp"
|
android:padding="16dp"
|
||||||
app:cardElevation="4dp"
|
android:gravity="center_vertical">
|
||||||
app:cardBackgroundColor="@color/surface">
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="남은 연차"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="@color/text_secondary"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="horizontal"
|
||||||
android:padding="24dp"
|
android:gravity="bottom">
|
||||||
android:gravity="center">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="남은 연차"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textColor="@color/text_secondary"
|
|
||||||
android:layout_marginBottom="8dp"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvRemainingDays"
|
android:id="@+id/tvRemainingDays"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="0.0"
|
android:text="15"
|
||||||
android:textSize="36sp"
|
android:textSize="28sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="@color/primary"
|
android:textColor="@color/primary"/>
|
||||||
android:layout_marginBottom="4dp"/>
|
|
||||||
|
|
||||||
<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="14sp"
|
android:textSize="14sp"
|
||||||
android:textColor="@color/text_tertiary"/>
|
android:textColor="@color/text_tertiary"
|
||||||
|
android:layout_marginStart="4dp"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
<!-- Calculation Info -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="※ 연차: -1일 / 반년: -0.5일 차감"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textColor="@color/text_tertiary"
|
||||||
|
android:layout_marginBottom="24dp"
|
||||||
|
android:gravity="center"/>
|
||||||
|
|
||||||
<!-- Calculation Info -->
|
</LinearLayout>
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="※ 연차: -1일 차감 / 반년: -0.5일 차감"
|
|
||||||
android:textSize="13sp"
|
|
||||||
android:textColor="@color/text_tertiary"
|
|
||||||
android:layout_marginBottom="24dp"
|
|
||||||
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>
|
|
||||||
|
|
||||||
</ScrollView>
|
|
||||||
|
|||||||
@@ -38,7 +38,8 @@
|
|||||||
<!-- Shift Abbreviation Circular Indicator (Center) -->
|
<!-- Shift Abbreviation Circular Indicator (Center) -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/shiftChar"
|
android:id="@+id/shiftChar"
|
||||||
android:layout_width="40dp"
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="주"
|
android:text="주"
|
||||||
|
|||||||
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"versionCode": 1143,
|
"versionCode": 1146,
|
||||||
"versionName": "1.4.3",
|
"versionName": "1.4.6",
|
||||||
"apkUrl": "https://git.webpluss.net/attachments/40d6f89e-58c9-41a2-a4d1-c72784a95b70",
|
"apkUrl": "https://git.webpluss.net/attachments/94d91eff-db0f-44af-b043-b03918cba243",
|
||||||
"changelog": "v1.4.3: 달력 레이아웃 1.3.0 버전처럼 복원 (마진 12dp, 고정 높이)",
|
"changelog": "v1.4.6: 휴가관리 중복 텍스트 제거, 자동 저장 기능 추가",
|
||||||
"forceUpdate": false
|
"forceUpdate": false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user