3 Commits

Author SHA1 Message Date
ccbd943c56 chore: 버전 업데이트 v1.4.3 (1143)
- versionCode: 1142 → 1143
- versionName: 1.4.2 → 1.4.3

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 23:32:09 +09:00
761e02fd94 fix: 달력 동적 높이 계산 제거 (1.3.0 스타일로 복원)
- RecyclerView 높이 동적 계산 코드 제거
- CalendarAdapter rowCount 파라미터 제거
- 아이템 높이를 XML에서 고정하도록 변경
- 달력이 자연스럽게 화면에 채워지도록 개선

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 23:30:28 +09:00
eda76a0ef6 fix: 달력 레이아웃 1.3.0 버전처럼 복원
- 양쪽 마진 4dp → 12dp 복원
- 달력 아이템 높이 92dp 고정으로 복원
- shiftChar 크기 48dp → 40dp 복원
- 달력 화면이 ConstraintLayout에 자연스럽게 채워지도록 수정

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 23:30:19 +09:00
6 changed files with 41 additions and 74 deletions

View File

@@ -20,8 +20,8 @@ android {
applicationId = "com.example.shiftalarm" applicationId = "com.example.shiftalarm"
minSdk = 26 minSdk = 26
targetSdk = 35 targetSdk = 35
versionCode = 1142 versionCode = 1143
versionName = "1.4.2" versionName = "1.4.3"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
} }

View File

@@ -20,10 +20,9 @@ data class DayShift(
) )
class CalendarAdapter( class CalendarAdapter(
var days: List<DayShift>, var days: List<DayShift>,
private val listener: OnDayClickListener, private val listener: OnDayClickListener,
var showHolidays: Boolean = true, var showHolidays: Boolean = true
private val rowCount: Int = 6 // Default to 6 rows
) : RecyclerView.Adapter<CalendarAdapter.ViewHolder>() { ) : RecyclerView.Adapter<CalendarAdapter.ViewHolder>() {
interface OnDayClickListener { interface OnDayClickListener {
fun onDayClick(date: LocalDate, currentShift: String) fun onDayClick(date: LocalDate, currentShift: String)
@@ -48,28 +47,19 @@ class CalendarAdapter(
return (dp * context.resources.displayMetrics.density).toInt() return (dp * context.resources.displayMetrics.density).toInt()
} }
override fun onBindViewHolder(holder: ViewHolder, position: Int) { override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val item = days[position] val item = days[position]
val context = holder.itemView.context val context = holder.itemView.context
// Fixed item height - square cells based on screen width if (item.date == null) {
val displayMetrics = context.resources.displayMetrics holder.itemView.visibility = View.INVISIBLE
val screenWidth = displayMetrics.widthPixels return
val itemHeight = screenWidth / 7 }
val layoutParams = holder.itemView.layoutParams holder.itemView.visibility = View.VISIBLE
layoutParams.height = itemHeight
holder.itemView.layoutParams = layoutParams
if (item.date == null) {
holder.itemView.visibility = View.INVISIBLE
return
}
holder.itemView.visibility = View.VISIBLE
// Day Number
// Day Number
holder.dayNumber.text = item.date.dayOfMonth.toString()
// Holiday / Weekend logic // Holiday / Weekend logic
val isSunday = item.date.dayOfWeek == java.time.DayOfWeek.SUNDAY val isSunday = item.date.dayOfWeek == java.time.DayOfWeek.SUNDAY
val isSaturday = item.date.dayOfWeek == java.time.DayOfWeek.SATURDAY val isSaturday = item.date.dayOfWeek == java.time.DayOfWeek.SATURDAY

View File

@@ -266,11 +266,10 @@ class MainActivity : AppCompatActivity() {
return (dp * resources.displayMetrics.density).toInt() return (dp * resources.displayMetrics.density).toInt()
} }
private fun setupCalendar() { private fun setupCalendar() {
binding.calendarGrid.layoutManager = GridLayoutManager(this, 7) binding.calendarGrid.layoutManager = GridLayoutManager(this, 7)
binding.calendarGrid.setHasFixedSize(false) // Allow dynamic item sizing updateCalendar()
updateCalendar() }
}
private fun updateCalendar() { private fun updateCalendar() {
val prefs = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE) val prefs = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
@@ -306,36 +305,15 @@ class MainActivity : AppCompatActivity() {
dao.getMemosForMonth(monthStr).associateBy { memoItem -> memoItem.date } dao.getMemosForMonth(monthStr).associateBy { memoItem -> memoItem.date }
} }
val days = generateDaysForMonthWithData(currentViewMonth, currentViewTeam, factory, overrides, memos) val days = generateDaysForMonthWithData(currentViewMonth, currentViewTeam, factory, overrides, memos)
// Calculate row count (5 or 6 rows) val adapter = CalendarAdapter(days, object : CalendarAdapter.OnDayClickListener {
val daysInMonth = currentViewMonth.lengthOfMonth() override fun onDayClick(date: LocalDate, currentShift: String) {
val firstDayOfMonth = currentViewMonth.atDay(1).dayOfWeek.value % 7 showDaySettingsDialog(date, currentShift)
val actualDayCount = firstDayOfMonth + daysInMonth }
val rowCount = if (actualDayCount <= 35) 5 else 6 }, binding.cbShowHolidays.isChecked)
val adapter = CalendarAdapter(days, object : CalendarAdapter.OnDayClickListener {
override fun onDayClick(date: LocalDate, currentShift: String) {
showDaySettingsDialog(date, currentShift)
}
}, binding.cbShowHolidays.isChecked, rowCount)
binding.calendarGrid.adapter = adapter
// Set RecyclerView height based on row count
// 5 rows: fixed height to fill space, no scroll
// 6 rows: max height (5 rows worth), enable scroll
val displayMetrics = resources.displayMetrics
val screenWidth = displayMetrics.widthPixels
val cellHeight = screenWidth / 7 // Square cells
val recyclerViewHeight = cellHeight * rowCount
val layoutParams = binding.calendarGrid.layoutParams
layoutParams.height = recyclerViewHeight
binding.calendarGrid.layoutParams = layoutParams
// Disable scroll for 5 rows, enable for 6 rows
binding.calendarGrid.isNestedScrollingEnabled = rowCount > 5
binding.calendarGrid.adapter = adapter
binding.monthTitle.text = currentViewMonth.format(DateTimeFormatter.ofPattern("yyyy년 MM월")) binding.monthTitle.text = currentViewMonth.format(DateTimeFormatter.ofPattern("yyyy년 MM월"))
// Update Header Status Text with Permission Warning if needed // Update Header Status Text with Permission Warning if needed

View File

@@ -58,12 +58,12 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<!-- Maximized Calendar Card - Reduced margins for wider calendar --> <!-- Maximized Calendar Card -->
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
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="4dp" android:layout_marginHorizontal="12dp"
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="4dp" android:layout_marginHorizontal="12dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
app:cardCornerRadius="20dp" app:cardCornerRadius="20dp"
app:cardElevation="0dp" app:cardElevation="0dp"

View File

@@ -4,8 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/dayRoot" android:id="@+id/dayRoot"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="92dp"
android:minHeight="72dp"
android:background="@drawable/bg_grid_cell_v4"> android:background="@drawable/bg_grid_cell_v4">
<!-- Day Number (top-left) --> <!-- Day Number (top-left) -->
@@ -17,7 +16,7 @@
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:text="12" android:text="12"
android:textColor="@color/text_primary" android:textColor="@color/text_primary"
android:textSize="15sp" android:textSize="14sp"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@@ -36,21 +35,21 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<!-- Shift Abbreviation Circular Indicator (Center) - Larger size --> <!-- Shift Abbreviation Circular Indicator (Center) -->
<TextView <TextView
android:id="@+id/shiftChar" android:id="@+id/shiftChar"
android:layout_width="48dp" android:layout_width="40dp"
android:layout_height="48dp" android:layout_height="40dp"
android:gravity="center" android:gravity="center"
android:text="주" android:text="주"
android:textSize="17sp" android:textSize="15sp"
android:textStyle="bold" android:textStyle="bold"
android:textColor="@color/text_primary" android:textColor="@color/text_primary"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintVertical_bias="0.42"/> app:layout_constraintVertical_bias="0.45"/>
<!-- Memo Content Text (Below Shift) - Replacing icon logic for visibility --> <!-- Memo Content Text (Below Shift) - Replacing icon logic for visibility -->
<TextView <TextView

View File

@@ -1,7 +1,7 @@
{ {
"versionCode": 1142, "versionCode": 1143,
"versionName": "1.4.2", "versionName": "1.4.3",
"apkUrl": "https://git.webpluss.net/attachments/96025498-3f84-4410-9f13-7cdd559ef60e", "apkUrl": "https://git.webpluss.net/attachments/40d6f89e-58c9-41a2-a4d1-c72784a95b70",
"changelog": "v1.4.2: 달력 5행/6행 스크롤 수정, 토스트 다크모드 완전 지원, 연차 설정 UI 개선", "changelog": "v1.4.3: 달력 레이아웃 1.3.0 버전처럼 복원 (마진 12dp, 고정 높이)",
"forceUpdate": false "forceUpdate": false
} }