Skip to content

Tag: android-glide

Getting the Activity inside Adapter in Android

I am trying to access the activity on which my Imageview is, so I can use the URL of an Image of type SVG and display it to the user using the GlideToVectorYou library. But when I try to get access to the activity using R.layout.activityname, a syntax error appears. this is the code that I’m using Thank…

Why my gif only loads if i click in the ImageView?

The problem that i’m having is that the gif only loads if i click in the image. I made a ViewHolderCreator class that builds the view. There is a method onCreateViewHolder that will tell which type it is.There are various types. This is the list in the class: The specific gif that i want is CI_IMAGE and…

Config Glide library for caching

How to set glide in the android project so that once images download to the app each time then displayed by the glide cache Answer Set your Glide object by providing the request options and that’s it. Glide will take care of caching for you. Happy coding with Glide “A simple and feature rich image…

GlideApp cannot be found

error: cannot find symbol variable GlideApp This is the error I have been getting. I’m using Android studio 3.3.1 and imported these modules for glide. Answer To use generated API in Glide you need to create a class and extend AppGlideModule and use @GlideModule annotation, for example: After this rebui…

Image becomes blurry when loading SVG with Glide

In the app I’m using the following sample to load an SVG image into ImageView: An ImageView in xml looks like this: So, the problem can be seen on the image below. The right icon was set from app’s resources, while the left one is loaded from server using Glide. For some reason image is not scalin…