Skip to content

Commit

Permalink
[UI] PlaceHolder 이미지 img_contents_dummy_3로 일괄 변경 (#886)
Browse files Browse the repository at this point in the history
  • Loading branch information
KxxHyoRim committed Jul 18, 2023
1 parent a53685f commit 992dda3
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions app/src/main/java/org/sopt/havit/util/BindingAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ fun ImageView.loadImage(url: String?) {

@BindingAdapter("iconSrc")
fun ImageView.loadIcon(url: String?) {
Glide.with(context)
.load(url)
.placeholder(R.drawable.img_contents_dummy)
Glide.with(context).load(url).placeholder(R.drawable.img_contents_dummy_3)
.circleCrop()
.into(this)
}
Expand Down Expand Up @@ -61,28 +59,22 @@ fun setBtnColor(btn: Button, isNext: Boolean) {

@BindingAdapter("imageSearch")
fun ImageView.loadSearch(url: String?) {
Glide.with(context)
.load(url)
.transform(CenterCrop(), RoundedCorners(px(4)))
.placeholder(R.drawable.img_contents_dummy)
Glide.with(context).load(url).transform(CenterCrop(), RoundedCorners(px(4)))
.placeholder(R.drawable.img_contents_dummy_3)
.into(this)
}

@BindingAdapter("imageDefaultLinearMin")
fun ImageView.defaultImageLinearMin(url: String?) {
Glide.with(context)
.load(url)
.transform(CenterCrop(), RoundedCorners(px(4)))
.placeholder(R.drawable.img_contents_dummy)
Glide.with(context).load(url).transform(CenterCrop(), RoundedCorners(px(4)))
.placeholder(R.drawable.img_contents_dummy_3)
.into(this)
}

@BindingAdapter("imageDefaultGrid")
fun ImageView.defaultImageGrid(url: String?) {
Glide.with(context)
.load(url)
.transform(CenterCrop(), RoundedCorners(px(4)))
.placeholder(R.drawable.img_contents_dummy_2)
Glide.with(context).load(url).transform(CenterCrop(), RoundedCorners(px(4)))
.placeholder(R.drawable.img_contents_dummy_3)
.into(this)
}

Expand Down Expand Up @@ -132,9 +124,11 @@ fun setPopupDescription(textView: TextView, rate: Int) {
in 34..66 ->
textView.text =
textView.context.getString(R.string.home_popup_description2)

in 67..99 ->
textView.text =
textView.context.getString(R.string.home_popup_description3)

100 -> textView.text = textView.context.getString(R.string.home_popup_description4)
}
}
Expand Down

0 comments on commit 992dda3

Please sign in to comment.