Skip to content

Commit

Permalink
[ADD/#8] placeholder 이미지 추가 및 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
b1urrrr committed May 12, 2023
1 parent 3529471 commit 10a8f42
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ object BindingAdapter {
@BindingAdapter("setRoundedCornersImage")
fun ImageView.setRoundedCornersImage(img: String?) {
load(img) {
placeholder(R.mipmap.ic_go_sopt)
placeholder(R.drawable.ic_loading)
error(R.drawable.ic_image_not_supported)
fallback(R.drawable.ic_image_not_supported)
transformations(RoundedCornersTransformation(50f))
Expand All @@ -22,7 +22,7 @@ object BindingAdapter {
@BindingAdapter("setCircleImage")
fun ImageView.setCircleImage(img: String?) {
load(img) {
placeholder(R.mipmap.ic_go_sopt)
placeholder(R.drawable.ic_loading)
error(R.drawable.ic_image_not_supported)
fallback(R.drawable.ic_image_not_supported)
transformations(RoundedCornersTransformation(1000f))
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_loading.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#AAAAAA"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.28,2.54 0.72,-1.21 -3.5,-2.08L13.5,8L12,8z"/>
</vector>

0 comments on commit 10a8f42

Please sign in to comment.