Skip to content

Commit

Permalink
Merge pull request #74 from TeamFILL-IN/feature/#71
Browse files Browse the repository at this point in the history
[feature/#71] 마이페이지 디폴트 이미지 수정
  • Loading branch information
hyunji24 authored Feb 20, 2022
2 parents ab213aa + 58b77e3 commit 6ed0708
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.content.Intent
import android.os.Bundle
import androidx.lifecycle.lifecycleScope
import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kakao.sdk.user.UserApiClient
Expand Down Expand Up @@ -83,6 +84,7 @@ class MyPageActivity : BindingActivity<ActivityMyPageBinding>(R.layout.activity_
binding.tvNickname.text = it.data.user.nickname
Glide.with(this@MyPageActivity)
.load(it.data.user.imageUrl)
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.circleCrop()
.into(binding.ivProfile)
}.onFailure(Timber::e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.teamfillin.fillin.data.response.ResponseUserPhotoInfo
import com.teamfillin.fillin.databinding.ItemMyPageBinding

Expand Down Expand Up @@ -43,7 +44,7 @@ class MyPagePhotoRecyclerViewAdapter(private val listener: ItemClickListener) :
) :
RecyclerView.ViewHolder(binding.root) {
fun bind(photo: ResponseUserPhotoInfo.Photo) {
Glide.with(itemView.context).load(photo.imageUrl).into(binding.ivPhoto)
Glide.with(itemView.context).load(photo.imageUrl).diskCacheStrategy(DiskCacheStrategy.RESOURCE).into(binding.ivPhoto)
binding.root.setOnClickListener {
listener.onClick(photo)
}
Expand Down

0 comments on commit 6ed0708

Please sign in to comment.