android-glide

Android: How to use TextView in placeholder of Glide or Picasso

瘦欲@ 提交于 2021-01-28 03:40:21
问题 i am using Glide or Picasso for loading the image like Glide.with(context).load(POST_IMAGE).placeholder(R.drawable.loading_img).error(R.drawable.bg_480_800).into(image); Picasso.with(context).load("image url").error(R.drawable.bg_480_800).placeholder(R.drawable.loading_img).into(holder.imageURL); In these two, i'm using image as place holder from the drawable folder. Now i want to use text inside the place holder instead of image from drawable folder. So, please help me to load text instead

Glide Multiple transformations in Android

允我心安 提交于 2021-01-27 04:29:17
问题 I've been using Glide to load images in my app. I've a custom transformation which I'm using while loading an image in ImageView . The problem is I want to apply my custom transformation & centerCrop both on the image fetched. But Glide is using only my custom transformation and displaying the image in ImageView with fitXY . Here is my code: Glide.with(context) .load(uri) .placeholder(R.drawable.image_id) .transform(new CustomTransformation(context)) .centerCrop() .into(imageView); How do I

Glide 4.6.1 image flicker on custom transformation

元气小坏坏 提交于 2020-12-15 05:17:01
问题 I have the following custom transformation (kotlin): private class IconTransformation : BitmapTransformation() { companion object { private const val ID = "com.example.widget.IconView\$IconTransformation" private val ID_BYTES = ID.toByteArray() private const val PAINT_FLAGS = Paint.DITHER_FLAG or Paint.FILTER_BITMAP_FLAG private const val CIRCLE_CROP_PAINT_FLAGS = PAINT_FLAGS or Paint.ANTI_ALIAS_FLAG private val CIRCLE_CROP_SHAPE_PAINT = Paint(CIRCLE_CROP_PAINT_FLAGS) private val CIRCLE_CROP

Glide 4.6.1 image flicker on custom transformation

拜拜、爱过 提交于 2020-12-15 05:16:13
问题 I have the following custom transformation (kotlin): private class IconTransformation : BitmapTransformation() { companion object { private const val ID = "com.example.widget.IconView\$IconTransformation" private val ID_BYTES = ID.toByteArray() private const val PAINT_FLAGS = Paint.DITHER_FLAG or Paint.FILTER_BITMAP_FLAG private const val CIRCLE_CROP_PAINT_FLAGS = PAINT_FLAGS or Paint.ANTI_ALIAS_FLAG private val CIRCLE_CROP_SHAPE_PAINT = Paint(CIRCLE_CROP_PAINT_FLAGS) private val CIRCLE_CROP

Play GIF image in glide once

你说的曾经没有我的故事 提交于 2020-08-25 07:35:07
问题 I'm trying to find how can I set a GIF image in image button and set it to play only once. SetContentView(Resource.Layout.activity_main); var ib_main_home = FindViewById<ImageButton>(Resource.Id.ds); Glide.With(this).AsGif() .Load(Resource.Mipmap.giphy) .Into(ib_main_home); 回答1: Please try to add a RequestListener . And set the loop count in OnResourceReady() . For example: Glide.With(this).AsGif().Load(Resource.Mipmap.giphy).Listener(new MyRequestListener()).Into(ib_main_home); And the