7 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
8a2dacb104 chore: 버전 업데이트 v1.4.2 (1142)
- versionCode: 1141 → 1142
- versionName: 1.4.1 → 1.4.2

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 23:21:19 +09:00
2f4b2ebe4c fix: 연차 설정 화면 ScrollView 추가
- 작은 화면에서 저장 버튼이 잘리지 않도록 ScrollView로 감싸기
- 저장 버튼 가시성 확보

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 23:18:31 +09:00
89068b4d05 fix: 토스트 다크모드 완전 지원
- 배경색을 반투명 회색(#CC333333)으로 변경하여 라이트/다크 모두 가독성 확보
- 텍스트 색상을 흰색(@android:color/white)으로 변경
- showCustomToast() 함수 개선

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 23:18:22 +09:00
7835d0ab65 fix: 달력 5행 고정높이, 6행 스크롤 지원
- 5행: RecyclerView 높이를 행 수에 맞게 고정, 스크롤 없음
- 6행: RecyclerView 높이를 6행으로 고정, 스크롤 활성화
- 아이템 높이를 화면 너비 기준 정사각형으로 통일

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

BIN
app.apk

Binary file not shown.

View File

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

View File

@@ -29,6 +29,27 @@ fun showCustomToast(context: Context, message: String, duration: Int = android.w
val toast = android.widget.Toast(context)
toast.duration = duration
toast.view = layout
toast.setGravity(android.view.Gravity.BOTTOM or android.view.Gravity.CENTER_HORIZONTAL, 0, 150)
toast.show()
} catch (e: Exception) {
// Fallback to default toast if custom toast fails
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) {

View File

@@ -22,8 +22,7 @@ data class DayShift(
class CalendarAdapter(
var days: List<DayShift>,
private val listener: OnDayClickListener,
var showHolidays: Boolean = true,
private val rowCount: Int = 6 // Default to 6 rows
var showHolidays: Boolean = true
) : RecyclerView.Adapter<CalendarAdapter.ViewHolder>() {
interface OnDayClickListener {
fun onDayClick(date: LocalDate, currentShift: String)
@@ -52,20 +51,6 @@ class CalendarAdapter(
val item = days[position]
val context = holder.itemView.context
// Dynamically adjust item height based on row count (5 or 6 rows)
val displayMetrics = context.resources.displayMetrics
val screenWidth = displayMetrics.widthPixels
val itemWidth = screenWidth / 7 // Each cell width
val itemHeight = if (rowCount == 5) {
(itemWidth * 1.2).toInt() // Taller items for 5 rows to fill space
} else {
itemWidth // Square items for 6 rows
}
val layoutParams = holder.itemView.layoutParams
layoutParams.height = itemHeight
holder.itemView.layoutParams = layoutParams
if (item.date == null) {
holder.itemView.visibility = View.INVISIBLE
return
@@ -75,7 +60,6 @@ class CalendarAdapter(
// Day Number
holder.dayNumber.text = item.date.dayOfMonth.toString()
// Holiday / Weekend logic
val isSunday = item.date.dayOfWeek == java.time.DayOfWeek.SUNDAY
val isSaturday = item.date.dayOfWeek == java.time.DayOfWeek.SATURDAY

View File

@@ -268,7 +268,6 @@ class MainActivity : AppCompatActivity() {
private fun setupCalendar() {
binding.calendarGrid.layoutManager = GridLayoutManager(this, 7)
binding.calendarGrid.setHasFixedSize(false) // Allow dynamic item sizing
updateCalendar()
}
@@ -308,17 +307,11 @@ class MainActivity : AppCompatActivity() {
val days = generateDaysForMonthWithData(currentViewMonth, currentViewTeam, factory, overrides, memos)
// Calculate row count (5 or 6 rows)
val daysInMonth = currentViewMonth.lengthOfMonth()
val firstDayOfMonth = currentViewMonth.atDay(1).dayOfWeek.value % 7
val actualDayCount = firstDayOfMonth + daysInMonth
val rowCount = if (actualDayCount <= 35) 5 else 6
val adapter = CalendarAdapter(days, object : CalendarAdapter.OnDayClickListener {
override fun onDayClick(date: LocalDate, currentShift: String) {
showDaySettingsDialog(date, currentShift)
}
}, binding.cbShowHolidays.isChecked, rowCount)
}, binding.cbShowHolidays.isChecked)
binding.calendarGrid.adapter = adapter
binding.monthTitle.text = currentViewMonth.format(DateTimeFormatter.ofPattern("yyyy년 MM월"))

View File

@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/surface" />
<corners android:radius="12dp" />
<!-- 배경색: 다크모드에서도 잘 보이도록 surface 색상 사용 -->
<solid android:color="#CC333333" />
<corners android:radius="16dp" />
<stroke
android:width="1dp"
android:color="@color/outline" />

View File

@@ -58,12 +58,12 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- Maximized Calendar Card - Reduced margins for wider calendar -->
<!-- Maximized Calendar Card -->
<androidx.cardview.widget.CardView
android:id="@+id/calendarCard"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginHorizontal="4dp"
android:layout_marginHorizontal="12dp"
android:layout_marginBottom="8dp"
app:cardCornerRadius="28dp"
app:cardElevation="0dp"
@@ -240,7 +240,7 @@
android:id="@+id/otherTeamsCard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="4dp"
android:layout_marginHorizontal="12dp"
android:layout_marginBottom="16dp"
app:cardCornerRadius="20dp"
app:cardElevation="0dp"

View File

@@ -4,8 +4,8 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@drawable/bg_custom_toast"
android:paddingHorizontal="16dp"
android:paddingVertical="10dp"
android:paddingHorizontal="20dp"
android:paddingVertical="12dp"
android:gravity="center">
<TextView
@@ -13,7 +13,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="@color/text_primary"
android:textColor="@android:color/white"
android:maxLines="2"
android:ellipsize="end" />

View File

@@ -1,8 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="24dp"
android:gravity="center_horizontal">
@@ -125,4 +130,6 @@
app:cornerRadius="12dp"
android:backgroundTint="@color/primary"/>
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/dayRoot"
android:layout_width="match_parent"
android:layout_height="85dp"
android:layout_height="92dp"
android:background="@drawable/bg_grid_cell_v4">
<!-- Day Number (top-left) -->
@@ -16,7 +16,7 @@
android:layout_marginTop="4dp"
android:text="12"
android:textColor="@color/text_primary"
android:textSize="15sp"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@@ -35,21 +35,21 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- Shift Abbreviation Circular Indicator (Center) - Larger size -->
<!-- Shift Abbreviation Circular Indicator (Center) -->
<TextView
android:id="@+id/shiftChar"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:text="주"
android:textSize="17sp"
android:textSize="15sp"
android:textStyle="bold"
android:textColor="@color/text_primary"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="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 -->
<TextView

View File

@@ -1,7 +1,7 @@
{
"versionCode": 1141,
"versionName": "1.4.1",
"apkUrl": "https://git.webpluss.net/attachments/23f6818f-a647-4f9e-905f-e99f5c9d93b0",
"changelog": "v1.4.1: 달력 5행일 때 화면 꽉 채우기, 다크모드 토스트 지원, 연차 저장/연동 수정",
"versionCode": 1143,
"versionName": "1.4.3",
"apkUrl": "https://git.webpluss.net/attachments/40d6f89e-58c9-41a2-a4d1-c72784a95b70",
"changelog": "v1.4.3: 달력 레이아웃 1.3.0 버전처럼 복원 (마진 12dp, 고정 높이)",
"forceUpdate": false
}