android-glide

Android memory leak with Glide

我是研究僧i 提交于 2020-02-02 05:43:09
问题 I have an activity which loads pictures in ImageViews with glide. Here is a sample of my glide code: Glide.with(ImageVOne.getContext()) .load(geoInfo.getPhotoUrl1()) .skipMemoryCache(true) .priority(Priority.NORMAL) .into(ImageVOne); I load from 1 to 35 pictures, each picture should be between 150ko & 250ko. I cannot reduce that. This activity can be accessed several times in a session from the main activity, and each time it loads different pictures. For example the first time it will be

How to apply animation on cached image in Glide

旧巷老猫 提交于 2020-01-24 09:49:50
问题 I want to show the image using Glide animation. I'm downloading this image from the server. The animation is working fine when it downloads from the server but it's not working when the image is taken from Glide cache requestOptions.skipMemoryCache(true); requestOptions.diskCacheStrategy(DiskCacheStrategy.ALL); Please check my code below RequestOptions requestOptions = new RequestOptions(); requestOptions.timeout((int) NetworkParam.CONNECTION_TIME_OUT); requestOptions.placeholder(R.drawable

Glide RoundedCorners not works

我只是一个虾纸丫 提交于 2020-01-23 06:34:45
问题 I am using Glide v4 to load image from internet. I transform the loaded image to be rounded corners. Sometime it doesn't work. I dont have any idea why. Any help would be appreciated. val photoCornerRadius = 30 GlideApp.with(context) .load(postDetail.postImageUrls[i]) .transform(MultiTransformation(CenterCrop(), RoundedCorners(photoCornerRadius))) .placeholder(R.drawable.ic_image) .error(R.drawable.ic_image_broken) .into(ivPhoto[i]) 来源: https://stackoverflow.com/questions/49778043/glide

Glide RoundedCorners not works

烂漫一生 提交于 2020-01-23 06:34:09
问题 I am using Glide v4 to load image from internet. I transform the loaded image to be rounded corners. Sometime it doesn't work. I dont have any idea why. Any help would be appreciated. val photoCornerRadius = 30 GlideApp.with(context) .load(postDetail.postImageUrls[i]) .transform(MultiTransformation(CenterCrop(), RoundedCorners(photoCornerRadius))) .placeholder(R.drawable.ic_image) .error(R.drawable.ic_image_broken) .into(ivPhoto[i]) 来源: https://stackoverflow.com/questions/49778043/glide

How to load Glide cached image in NotificationCompat.Builder.setLargeIcon()?

谁说我不能喝 提交于 2020-01-21 11:48:09
问题 Like this image I am trying to set notification large icon as user profile thumbnail like whatsapp or other chatting apps I have tried Glide.with(context) .asBitmap() .load(messageNotification.getLargeIcon()) .into(new SimpleTarget<Bitmap>() { @Override public void onResourceReady(Bitmap resource, Transition<? super Bitmap> transition) { builder.setLargeIcon(resource); } }); but it is not working.. Any Help? 回答1: If you set the large icon using glide..the you should also notify the

How to load Glide cached image in NotificationCompat.Builder.setLargeIcon()?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-21 11:47:07
问题 Like this image I am trying to set notification large icon as user profile thumbnail like whatsapp or other chatting apps I have tried Glide.with(context) .asBitmap() .load(messageNotification.getLargeIcon()) .into(new SimpleTarget<Bitmap>() { @Override public void onResourceReady(Bitmap resource, Transition<? super Bitmap> transition) { builder.setLargeIcon(resource); } }); but it is not working.. Any Help? 回答1: If you set the large icon using glide..the you should also notify the

How to make border for circle cropped image in glide

久未见 提交于 2020-01-20 14:02:48
问题 in default, the image that is cropped by glide has no border I need to have a border in the circle image. 回答1: Version 4 I made this way, RoundedCorners Class: import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapShader; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.RectF; import android.graphics.Shader; import com.bumptech.glide.Glide; import com.bumptech.glide.load.Transformation

How to make border for circle cropped image in glide

核能气质少年 提交于 2020-01-20 14:02:46
问题 in default, the image that is cropped by glide has no border I need to have a border in the circle image. 回答1: Version 4 I made this way, RoundedCorners Class: import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapShader; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.RectF; import android.graphics.Shader; import com.bumptech.glide.Glide; import com.bumptech.glide.load.Transformation

Images loading randomly into view pager with Glide and SimpleTarget

邮差的信 提交于 2020-01-14 10:36:09
问题 I'm using Glide to load image into a ViewPager using an PagerAdapter . When I load the images using the following method: Glide.with(mContext).load(mImage).placeholder(R.drawable.placeholder).into(mImageView); Everything works fine, but now I need to get the bitmap from glide and store it in a map when it loads for future edit, so I switched this method to the following one: Glide.with(mContext).load(mImage).asBitmap().placeholder(R.drawable.placeholder).into(new SimpleTarget<Bitmap>() {

Android Glide library NoClassDefFoundError

不想你离开。 提交于 2020-01-13 19:45:30
问题 Am i using the Glide library wrongly? what could be the problem? protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ImageView iv = (ImageView) findViewById(R.id.imageView1); Glide.with(this).load(R.drawable.salads_caesar_salad).into(iv); } 回答1: If your code compiles fine it's highly likely you have the right dependencies on the compile classpath. If you use Android Studio/Gradle it's possible that ProGuard somehow