|
|
@@ -6,12 +6,13 @@ import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
|
|
|
import com.bumptech.glide.request.RequestOptions
|
|
|
import me.vadik.knigopis.R
|
|
|
|
|
|
-fun ImageView.setCircleImage(url: String?, placeholder: Int? = null) {
|
|
|
+fun ImageView.setCircleImage(url: String?) {
|
|
|
Glide.with(context)
|
|
|
.load(url)
|
|
|
.apply(
|
|
|
RequestOptions.circleCropTransform()
|
|
|
- .placeholder(placeholder ?: R.drawable.oval_placeholder_background)
|
|
|
+ .placeholder(R.drawable.oval_placeholder_background)
|
|
|
+ .theme(context.theme)
|
|
|
)
|
|
|
.transition(DrawableTransitionOptions.withCrossFade())
|
|
|
.into(this)
|