Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEP-374 fix: 캘린더 이동 시 텍스트오류 해결 및 디자인 수정 #181

Merged
merged 6 commits into from
Jan 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class DetailHistoryActivity :
binding.ivPrevious.setOnSingleClickListener {
binding.cvHistory.findFirstVisibleMonth()?.let { calendarMonth ->
binding.cvHistory.smoothScrollToMonth(calendarMonth.yearMonth.previousMonth)
onCalendarMonthMoved(calendarMonth.yearMonth.nextMonth)
onCalendarMonthMoved(calendarMonth.yearMonth.previousMonth)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ class DayBind(private val executeDateWithStatusList: Map<LocalDate, Status> = em
val rangeBetweenBackground = context.getDrawableCompat(R.drawable.bg_range_middle) as GradientDrawable
val singleBackground = context.getDrawableCompat(R.drawable.bg_single_selection) as GradientDrawable
val todayBackground = context.getDrawableCompat(R.drawable.bg_today)
val achievedTodayBackground = context.getDrawableCompat(R.drawable.bg_today_selection) as GradientDrawable

rangeBetweenBackground.setColor(context.getHabitColor(color))
singleBackground.setColor(context.getHabitColor(color))
achievedTodayBackground.setColor(context.getHabitColor(color))

container.textView.text = data.date.dayOfMonth.toString()
roundBgView.visibility = View.INVISIBLE
Expand Down Expand Up @@ -90,7 +92,10 @@ class DayBind(private val executeDateWithStatusList: Map<LocalDate, Status> = em
roundBgView.applyBackground(singleBackground)
}
Status.SINGLE -> {
roundBgView.applyBackground(singleBackground)
roundBgView.applyBackground(
if(data.date == today) achievedTodayBackground
else singleBackground
)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/green_50" />
<stroke
android:width="1dp"
android:color="@color/gray_200" />
</shape>
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
android:id="@+id/container_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="36dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_back">
Expand All @@ -51,6 +52,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="@color/transparency_color"
android:includeFontPadding="false"
android:textSize="20sp"
tools:text="\uD83D\uDE00" />

Expand Down Expand Up @@ -254,7 +256,8 @@
android:id="@+id/iv_previous"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
android:padding="10dp"
android:layout_marginEnd="10dp"
app:layout_constraintBottom_toBottomOf="@id/tv_today"
app:layout_constraintEnd_toStartOf="@id/tv_today"
app:layout_constraintTop_toTopOf="@id/tv_today"
Expand All @@ -264,7 +267,8 @@
android:id="@+id/iv_next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:padding="10dp"
android:layout_marginStart="10dp"
app:layout_constraintBottom_toBottomOf="@id/tv_today"
app:layout_constraintStart_toEndOf="@id/tv_today"
app:layout_constraintTop_toTopOf="@id/tv_today"
Expand Down