Skip to content

Commit

Permalink
공지 내용 html 태그 핸들링 로직 추가 (#210)
Browse files Browse the repository at this point in the history
* Html 핸들링 함수 추가

Html 태그를 띠고, 이를 반영해주는 기능 제공

* 공지 상세 하단 패딩값 제거
  • Loading branch information
easyhooon authored Jan 31, 2024
1 parent 672b0b0 commit cd7cf58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

package us.wedemy.eggeum.android.main.ui.adapter.viewholder

import android.text.Html
import android.view.View
import androidx.recyclerview.widget.RecyclerView
import us.wedemy.eggeum.android.main.databinding.ItemNoticeListBinding
Expand All @@ -17,7 +18,7 @@ class NoticeListItemViewHolder(val binding: ItemNoticeListBinding) : RecyclerVie
binding.apply {
tvNoticeTitle.text = notice.title
tvNoticeDate.text = notice.date
tvNoticeDescription.text = notice.description
tvNoticeDescription.text = Html.fromHtml(notice.description, Html.FROM_HTML_MODE_COMPACT)
ivNoticeExpand.rotation = if (notice.isExpanded) 180f else 0f
llLayoutExpand.visibility = if (notice.isExpanded) View.VISIBLE else View.GONE
}
Expand Down
1 change: 0 additions & 1 deletion main/src/main/res/layout/item_notice_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:paddingBottom="18dp"
android:textColor="@color/gray_500" />

</LinearLayout>
Expand Down

0 comments on commit cd7cf58

Please sign in to comment.