textDrawable #136
@ -4,6 +4,7 @@ import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
import android.widget.ImageView
|
||||
import androidx.core.graphics.drawable.RoundedBitmapDrawableFactory
|
||||
import bou.amine.apps.readerforselfossv2.android.utils.CircleImageView
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.request.RequestOptions
|
||||
import com.bumptech.glide.request.target.BitmapImageViewTarget
|
||||
@ -34,6 +35,14 @@ fun Context.circularBitmapDrawable(url: String, iv: ImageView) =
|
||||
}
|
||||
})
|
||||
|
||||
fun Context.circularDrawable(url: String, view: CircleImageView) {
|
||||
view.textView.text =""
|
||||
|
||||
Glide.with(this)
|
||||
.load(url)
|
||||
.into(view.imageView)
|
||||
}
|
||||
|
||||
fun getBitmapInputStream(bitmap:Bitmap,compressFormat: Bitmap.CompressFormat): InputStream {
|
||||
val byteArrayOutputStream = ByteArrayOutputStream()
|
||||
bitmap.compress(compressFormat, 80, byteArrayOutputStream)
|
||||
|
Loading…
Reference in New Issue
Block a user