Skip to content

Commit

Permalink
[FEAT] 공지사항 아이템 background 적용, 툴바 하단 divider 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
kim0hoon committed Sep 3, 2023
1 parent 2ae1c9c commit 21b8b24
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class MyNoticeFragment : BaseFragment<FragmentMyNoticeBinding>(), MyNoticeClickL
with(binding.rvNotices) {
layoutManager = LinearLayoutManager(context)
adapter = BindableItemAdapter()
val marginPx = ITEM_MARGIN_DP.toPx(context)
val marginPx = NOTICE_ITEM_MARGIN_DP.toPx(context)
addItemDecoration(MyNoticeItemDecoration(marginPx = marginPx))
addOnScrollListener(object : RecyclerView.OnScrollListener() {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
Expand Down Expand Up @@ -94,7 +94,7 @@ class MyNoticeFragment : BaseFragment<FragmentMyNoticeBinding>(), MyNoticeClickL
}

companion object {
private const val ITEM_MARGIN_DP = 16
private const val NOTICE_ITEM_MARGIN_DP = 8
}

}
9 changes: 9 additions & 0 deletions app/src/main/res/layout/fragment_my_notice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<View
android:id="@+id/vToolbarDivider"
android:layout_width="0dp"
android:layout_height="0.5dp"
android:background="@color/gray_200"
app:layout_constraintBottom_toBottomOf="@id/inToolbar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvNotices"
android:layout_width="0dp"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/item_my_notice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:background="@drawable/shape_rectangle_white_stroke_gray_200_r8"
android:padding="16dp">

<TextView
Expand Down

0 comments on commit 21b8b24

Please sign in to comment.