android-glide

Glid4 - BitmapImageViewTarget at into method

╄→尐↘猪︶ㄣ 提交于 2019-12-08 11:14:37
问题 Today I'm trying to use Glide4 image loader in my android application while using this I had facing method not resolving problem. I have searched a lot and also found a solution, I have to created RequestOptions and use like this: private void loadImages() { RequestOptions requestOptions = new RequestOptions(); requestOptions.placeholder(R.drawable.circle_diff); requestOptions.centerCrop(); Glide.with(this) .load("http://localhost/ImageRepo/profile.jpg") .apply(requestOptions) .into(new

How to cache Firebase storage downloaded images

点点圈 提交于 2019-12-08 05:04:28
问题 I am developing an app where I need to cache images such that I can retrieve them when the user is offline and they should also be accessible once the user closes and reopens the app. I need something like FirebaseFirestoreSettings.setPersistenceEnables(true) My problem is that I can not find a proper way of doing it. I tried saving the pictures to LruCache but all the cached data gets deleted once the app is closed. I can save the pictures into a file and retrieve them but I don't want the

How to share image from link ,i.e, without downloading the image just share using a button

对着背影说爱祢 提交于 2019-12-08 01:26:25
问题 I am beginner in android studio and i think it will be easy but also I am not getting that How to share image from link ,i.e, without downloading the image just share on social media like whats app .I can download the image and then share and then delete that but I do not want to do that. I am using glide library to load the image in Image view and then when a user click on a button it will just share its image which is showing in image view and whose link i have and then come back to the app

Image grayscale using glide library

情到浓时终转凉″ 提交于 2019-12-07 23:31:43
问题 I am using glide library to load image url in image view. Glide.with(context) .load(imageurl) .apply(RequestOptions.circleCropTransform()) .into(holder.thumbnail); Actually, the image is loaded fine with rounded image. I need the image to be loaded with rounded + grayscale image Can this be done by using glide lib? 回答1: You can use Android's android.graphics.ColorMatrix class to set the saturation to 0 for making an ImageView grayscale. You can achieve what you want in two steps. 1. Use Glide

Glide: load image to push notifications

时光怂恿深爱的人放手 提交于 2019-12-07 15:58:44
问题 I am trying to load an image to a push notification using Glide but it says this: FATAL EXCEPTION: Thread-9730 Process: com.monkingme.monkingmeapp, PID: 24226 java.lang.IllegalArgumentException: You must call this method on the main thread at com.bumptech.glide.util.Util.assertMainThread(Util.java:135) And the code used: NotificationTarget notificationTarget = new NotificationTarget( context, rv, R.id.remoteview_notification_icon, notification, NOTIFICATION_ID); Glide.with(context

How to make glide display like picasso?

放肆的年华 提交于 2019-12-07 12:44:27
问题 I've been using Picasso's library to load images into my gridview in my application and it works and looks exactly as I'd like. But users are telling me that the images are loading very slowly. I know that this is because of poor network speed and Picasso is loading my full images which are very big and then resizing them to fit my image view. So I tried using glide which loads the images in almost twice the speed but on some images it's not keeping the structure like Picasso does. For

Load already fetched image when offline in Glide for Android

隐身守侯 提交于 2019-12-07 09:59:23
问题 Am using Glide version 4.8.0 And for loading an image I do this GlideApp .with(HomePageFragment.this) .load(remoteURL) .diskCacheStrategy(DiskCacheStrategy.ALL) .into(mImageView); When the device is connected to Internet the image loades successfully but when device goes offline , how to load the same image from cache that was already featched from the remoteURL ? My CustomAppGlideModule looks like this @GlideModule public class CustomAppGlideModule extends AppGlideModule { @Override public

Glide cache image on disk on background thread

守給你的承諾、 提交于 2019-12-07 03:05:42
问题 I want to use Glide to eagerly download images and cache them on disk for a future use. I want to call this functionality from a background thread. I've read Glide's caching documentation, but it doesn't explain how to download the image without having an actual target right now. Then I found this issue and tried to use a similar approach, but whatever I try I get this exception: java.lang.IllegalArgumentException: You must call this method on the main thread So, how can I tell Glide to cache

Glide: log each request

自古美人都是妖i 提交于 2019-12-07 01:35:45
问题 Consider the code below: Glide.with(<your_context>) .load(<remote_file_url, local_file_path>) .into(<imageview>); Above Glide code is written in lots of file. Simply I want to log my remote_file_url or local_file_path in logcat. But I don't want to change the code in every file. Is Glide allowing logging? If it allows, then I need a simple central way to turn on glide logging. For Reference: I want the way like Retrofit + okhttp allow. In OkHttp , I just have to add interceptor at one

Getting black ImageView using Picasso and Glide

喜欢而已 提交于 2019-12-06 16:30:02
问题 The problem I'm writing an Android app that's supposed to have a "Slideshow" feature on it. I've found this nice library, based on Picasso, that does exactly what I wanted, and it worked just fine most of the times. Problem is, sometimes my images are not loaded into the slide ImageView ... It only shows a "black canvas" as you can see on the screenshot below. I am loading the image from a local resource from my drawables. Sometimes it happens on Portrait mode, sometimes on Landscape mode. It