android-glide

Getting black ImageView using Picasso and Glide

夙愿已清 提交于 2019-12-04 22:12:39
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 doesn't matter which image I use, sometimes that "blackness" happens. EDIT: I'm using Android 5.0.2

Glide load into SimpleTarget<Bitmap> not honoring the specified width and height

妖精的绣舞 提交于 2019-12-04 21:44:55
问题 I'm using Glide to load an image, resize it and save it to a file by means of a SimpleTarget<Bitmap> . These images will be uploaded to Amazon S3, but that's besides the point. I'm resizing the images prior to uploading as to save as much user's bandwidth as possible. For my app needs a 1024 pixel wide image is more than enough, so I'm using the following code to accomplish that: final String to = getMyImageUrl(); final Context appCtx = context.getApplicationContext(); Glide.with(appCtx)

Glide load thumbnail not working

橙三吉。 提交于 2019-12-04 20:57:09
问题 I'm using Glide to load thumbnail from videos but it doesn't seem to be working on my app. The ImageView is just empty for some reason. Glide.with(context) .load(url) .asBitmap() .thumbnail(0.1f) .diskCacheStrategy(DiskCacheStrategy.ALL) .into(target); I added a listener, so I can figure out what is wrong but the Exception thrown is null. I tried using ThumbnailUtils using the same url because I thought there might be something wrong with it but the thumbnail loads fine. Anyone experiencing

Can I load images synchronously with Glide?

此生再无相见时 提交于 2019-12-04 17:56:07
问题 I know it isn't very practical to load bitmaps from the device storage synchronously, but I really have to do it. I haven't figured out any way to do this. 回答1: Yes is possible and is in glide documentation. For example if you need to retrive the Bitmap synchronously you can do: Glide V3: Bitmap myBitmap = Glide.with(applicationContext) .load(yourUrl) .asBitmap() .into(500, 500) .get() Glide v4: FutureTarget<Bitmap> futureBitmap = Glide.with(applicationContext) .asBitmap() .load(yourURL))

Image not retrieving from Firebase

℡╲_俬逩灬. 提交于 2019-12-04 14:32:15
I am trying to build a messenger type app. And for this, I have uploaded an image from my phone to Firebase. The image is successfully stored in Firebase storage. I am trying to show the image on my phone. And I use both Picasso and Glide to retrieve the image from Firebase. But my picture isn't showing. But when I add placeholder I can see the default image that is set by a placeholder. How can I solve this problem? My code is given below: package com.example.ichat; import android.app.ProgressDialog; import android.content.Intent; import android.net.Uri; import android.support.annotation

FirebaseImageLoader doesn't download image

走远了吗. 提交于 2019-12-04 09:37:31
I'm trying to download image from storage inside of ViewHolder, but it doesn't work: FirebaseStorage storage = FirebaseStorage.getInstance(); StorageReference storageReference = storage.getReference(); StorageReference imgRef = storageReference.child("11325404_436219506581300_875224883_a.jpg"); Glide.with(context) .using(new FirebaseImageLoader()) .load(imgRef) .into(imageView); When I use uri instead of FirebaseImageLoader everything works fine: Glide.with(context) .load(uri) .centerCrop() .into(imageView) What could be a reason for that? Update: I've tried to add this code and it shows me

Glide: load drawable but don't scale placeholder

浪尽此生 提交于 2019-12-04 08:20:38
问题 Is there a way to use Glide to assign a placeholder but keep this image to its original scale? I have an ImageView with variable size (depending on the incoming image) which I set before calling Glide.with().load().into() and I want to use a placeholder for it but don't want the placeholder to be resized to the size of the ImageView , I want it to keep its original size. So far I couldn't find a way to do this. 回答1: Re: Gregs comment: I gave it another shot (with almost a year of extra XP)

Glide FileNotFoundException: No content provider when loading images from internet

时光总嘲笑我的痴心妄想 提交于 2019-12-03 23:26:37
I made my own rest api and now it just has endpoint where I show some images. Here how it looks in spring boot application @GetMapping("/image/{name:.+}") public byte[] getImage(@PathVariable(value = "name") String name) { return storageService.loadFileAsByteArray(name); } and this is storage service method public byte[] loadFileAsByteArray(String filename) { Resource resource = loadFile(filename); try { return IOUtils.toByteArray(resource.getInputStream()); } catch (IOException e) { e.printStackTrace(); } return null; } and here what I do in my android app Glide.with(context!!

Glide not updating image android of same url?

主宰稳场 提交于 2019-12-03 22:18:24
I have the same url for an image. When I update this image more than one time it shows the previous image. The image and picture version on the server is updated but Glide is not showing the new image.I want to get new image every time and cache it . Glide.with(context) .load(Constants.COPY_LINK_BASE_URL + info.getDisplayPicture()) .placeholder(R.drawable.ic_profile).dontAnimate() .diskCacheStrategy(DiskCacheStrategy.SOURCE) .signature(new (SettingManager.getUserPictureVersion(context))) .into(ivUserProfilePhoto); I can reproduce this bug by changing internet ,on one internet its change image

How to load a circular appcompat actionbar logo using glide

旧时模样 提交于 2019-12-03 22:04:37
Till now I have done the following, if I omit the circular image creation part it works fine, but I must show a circular image in actionbar here is what I have tried so far, any help will be highly appreciated Glide.with(mContext) .load(doctorDetailsList.get(0).getDoc_imgurl().replace("200x200", Measuredwidth + "x" + Measuredwidth)) .placeholder(R.drawable.no_image) .override(Measuredwidth, Measuredwidth) .into(new Target<GlideDrawable>() { @Override public void onLoadStarted(Drawable placeholder) { } @Override public void onLoadFailed(Exception e, Drawable errorDrawable) { } @Override public