android-glide

Android - Load Thumbnail from Website URL using Glide/Picasso

纵然是瞬间 提交于 2019-12-24 00:34:22
问题 I'm trying to load a thumbnail for an article on the web using Glide, but it returns an empty field. Unlike other examples this URL does not directly link to a PNG/JPG etc, rather its a website link from which I require it to load the default thumbnail. The ImageView has been set & initialised properly. I have used Glide & Picasso in separate attempts, but it the ImageView is blank. Snippet ivGlide = (ImageView) findViewById(R.id.ivGlide); String uriLoad = "http://www.recode.net/2016/7/26

Can't set GlideBuilder

我是研究僧i 提交于 2019-12-23 19:34:08
问题 I use Glide library for Android. I want to set the cache in my custom folder, so the standard cache folder can be clean (with Master Clean for example). For this reason I use this code from manual, but this don't work for me. My code: DiskCache.Factory diskCacheFactory = new DiskCache.Factory() { @Override public DiskCache build() { DiskCache diskCache = DiskLruCacheWrapper.get(getFilesDir(), 1024*1024*100); return diskCache; } }; new GlideBuilder(this).setDiskCache(diskCacheFactory); Glide

Loading Images with Glide and FirebaseUI in newest Firebase Version (10.2.4)

╄→尐↘猪︶ㄣ 提交于 2019-12-23 18:13:46
问题 So I updated firebase to the newest version (10.2.4) alongside playservices, and suddenly all the images in my app loaded with Glide are no longer loading. If I have this in my build.gradle ext { supportLibraryVersion = '25.3.1' firebaseLibraryVersion = '10.2.1' playServicesLibraryVersion = '10.2.1' } dependencies { // play services compile "com.google.android.gms:play-services-places:$playServicesLibraryVersion" compile "com.google.android.gms:play-services-auth:$playServicesLibraryVersion"

Image becomes blurry when loading SVG with Glide

℡╲_俬逩灬. 提交于 2019-12-23 17:03:51
问题 In the app I'm using the following sample to load an SVG image into ImageView: Glide.with(context) .using(Glide.buildStreamModelLoader(Uri.class, context), InputStream.class) .from(Uri.class) .as(SVG.class) .transcode(new SvgDrawableTranscoder(), PictureDrawable.class) .sourceEncoder(new StreamEncoder()) .cacheDecoder(new FileToStreamDecoder<>(new SvgDecoder())) .decoder(new SvgDecoder()) .listener(new SvgSoftwareLayerSetter()) .diskCacheStrategy(DiskCacheStrategy.NONE) .load(uri) .into

Android listview with Glide - doubled bitmaps after load

非 Y 不嫁゛ 提交于 2019-12-23 16:22:42
问题 I'm developing an android application. One of my fragments contains a simple listview showing friend list. Each friend can have its own profile image - it is set by the Glide library. When user has no profile pic set the default image is shown. My problem is, that every time, first element on the list gets the same picture which is set on the last element of the list which is not default picture. What i mean is shown on pic: user with name wiktor has set profile picture and as you see the

Glide resizing image via override does not resize the image

房东的猫 提交于 2019-12-23 09:26:21
问题 I'm using Glide to download and display image, however, when I tried to resize the image, it does not do so. I get random size (or perhaps its the actual size of the image). Here's the code I used for loading via Glide Glide.with(context) .load(file.getUrl()) .asBitmap() .diskCacheStrategy(DiskCacheStrategy.ALL) .centerCrop() .transform(new CropCircleTransform(context)) .override(dimen, dimen) .into(new SimpleTarget<Bitmap>() { @Override public void onResourceReady(Bitmap resource,

Image is not loaded using Glide

两盒软妹~` 提交于 2019-12-22 18:26:26
问题 I have a vector image. If I want to set the image to ImageView, the picture is not loaded. code: Glide.with(this).load(R.drawable.vector_image).into(imageView) However, when I use: imageView.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.vector_image)) and it is working. Any ideas? 回答1: Glide doesn't support vector drawables yet. So implementing vector drawables you have to do yourself. For reference you can check below links for this issue reported by developers on github: link

Add imageViews dynamically on Android

天涯浪子 提交于 2019-12-22 14:47:08
问题 I want display images from HTML, and I get image url source using Jsoup . But, a problem is that each post has a different number of pictures. So, I can't fix the number of ImageViews in xml layout. After I researched, I know that I can create ImageViews dynamically. So, I create ImageViews and insert them into Linearlayout . But, I can only see one picture which I inserted lastly. package kr.ac.mju.hanmaeum.activity.notice; import android.content.Intent; import android.media.Image; import

How to invalidate Glide cache for some specific images

北慕城南 提交于 2019-12-22 08:26:44
问题 I'm writing an app which needs to load a lot of images from the internet (a manga reader). I need to cache some thumbnail images for offline use, any others should be cleared when app closed. I read some about cache invalidation on Glide page, they said the best way is to change the content url, but how Glide know if it is a modified url of old content or a new one? I'm new to Glide here. https://github.com/bumptech/glide/wiki/Caching-and-Cache-Invalidation Thank in advance :) 回答1: You can

android.graphics.drawable.TransitionDrawable cannot be cast to com.bumptech.glide.load.resource.bitmap.GlideBitmapDrawable

此生再无相见时 提交于 2019-12-22 08:24:29
问题 I have loaded remote image to ImageView using below code Glide.with(context) .load(imageUrl) .placeholder(R.drawable.placeholderImage) .into(holder.wallPaperImageView); Now I want to get the bitmap from imageview Bitmap bitmap = ((GlideBitmapDrawable)holder.wallPaperImageView.getDrawable()).getBitmap(); but above line of code throws below exception: java.lang.ClassCastException: android.graphics.drawable.TransitionDrawable cannot be cast to com.bumptech.glide.load.resource.bitmap