Skip to content

Commit

Permalink
Merge branch 'develop' into refactor/cafeteria
Browse files Browse the repository at this point in the history
  • Loading branch information
huiwoo-jo authored Mar 26, 2024
2 parents eb97cf3 + 01dd2bf commit d416eec
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ScheduleAdapter : RecyclerView.Adapter<ScheduleAdapter.ViewHolder>() {
: RecyclerView.ViewHolder(binding.root) {

fun bind(item: ScheduleEntry) {
binding.tvItemScheduleDate.text = if(item.dates[0] == item.dates[1]) item.dates[0] else "${item.dates[0]} ~ \n${item.dates[1]}"
binding.tvItemScheduleDate.text = if(item.dates[0] == item.dates[1]) item.dates[0] else "${item.dates[0]}\n~ ${item.dates[1]}"
binding.tvItemScheduleContents.text = item.contents
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
package com.dongyang.android.youdongknowme.ui.view.schedule

import android.content.res.ColorStateList
import android.graphics.Bitmap
import android.graphics.Canvas
import android.graphics.PorterDuff
import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.Drawable
import androidx.core.content.ContextCompat
import androidx.core.content.res.ResourcesCompat
import androidx.core.graphics.drawable.DrawableCompat
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import com.dongyang.android.youdongknowme.R
Expand All @@ -21,6 +30,10 @@ class ScheduleFragment : BaseFragment<FragmentScheduleBinding, ScheduleViewModel

override fun initStartView() {
viewModel.setPickedDate(binding.mvScheduleCalendar.currentDate)

binding.mvScheduleCalendar.leftArrow.setTintList(ColorStateList.valueOf(ContextCompat.getColor(this.requireContext(), R.color.blue300)))
binding.mvScheduleCalendar.rightArrow.setTintList(ColorStateList.valueOf(ContextCompat.getColor(this.requireContext(), R.color.blue300)))

adapter = ScheduleAdapter()
binding.rvScheduleList.apply {
this.adapter = this@ScheduleFragment.adapter
Expand Down Expand Up @@ -83,4 +96,4 @@ class ScheduleFragment : BaseFragment<FragmentScheduleBinding, ScheduleViewModel
calendarHeaderBuilder.toString()
}
}
}
}
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_arrow_left.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M15.869,4.329C16.08,4.54 16.198,4.826 16.198,5.124C16.198,5.422 16.08,5.708 15.869,5.919L9.914,11.874L15.869,17.829C15.98,17.932 16.068,18.056 16.13,18.194C16.191,18.332 16.224,18.481 16.227,18.632C16.23,18.783 16.202,18.933 16.145,19.073C16.089,19.213 16.005,19.341 15.898,19.448C15.791,19.554 15.664,19.639 15.524,19.695C15.384,19.752 15.233,19.78 15.082,19.777C14.931,19.774 14.782,19.741 14.644,19.68C14.506,19.618 14.382,19.529 14.279,19.419L7.529,12.669C7.319,12.458 7.2,12.172 7.2,11.874C7.2,11.576 7.319,11.29 7.529,11.079L14.279,4.329C14.49,4.118 14.776,4 15.074,4C15.372,4 15.658,4.118 15.869,4.329Z"
android:fillColor="#7F8295"
android:fillType="evenOdd"/>
</vector>
2 changes: 2 additions & 0 deletions app/src/main/res/layout/fragment_schedule.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/toolbar_schedule"
app:mcv_headerTextAppearance="@style/CalendarHeader"
app:mcv_leftArrowMask="@drawable/ic_arrow_left"
app:mcv_rightArrowMask="@drawable/ic_arrow_right"
app:mcv_tileHeight="50dp"
app:mcv_tileWidth="0dp" />

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/item_schedule.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="18dp">
android:paddingVertical="20dp"
android:paddingHorizontal="16dp">

<TextView
android:id="@+id/tv_item_schedule_date"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<!-- 달력 연, 월 스타일 지정 -->
<style name="CalendarHeader">
<item name="android:fontFamily">@font/pretendard_semibold</item>
<item name="android:textSize">16sp</item>
<item name="android:textSize">16dp</item>
<item name="android:textColor">@color/gray500</item>
</style>
</resources>

0 comments on commit d416eec

Please sign in to comment.