Android-Image-Slider icon indicating copy to clipboard operation
Android-Image-Slider copied to clipboard

PNG images are not being displayed.

Open Krishna16 opened this issue 6 years ago • 6 comments

Hey guys. So I was trying out this slider view and noticed that my PNG images which I have stored in the drawable folder aren't getting displayed. When I write ("" + R.drawable.save) in the setImageUrl method, it just displays a white screen. I tried adding the url method in the addNewItems method and renewItems as well, with no luck. Has anyone else faced this issue? Thanks in advance.

Krishna16 avatar Feb 19 '20 07:02 Krishna16

Try deleting the cache on your App and restart. See if it works. I faced the same white screen problem also before.

erwandy92 avatar Feb 20 '20 09:02 erwandy92

Try deleting the cache on your App and restart. See if it works. I faced the same white screen problem also before.

Hey, thanks for your response, but unfortunately it didn't solve my problem. Tell me one thing, did you need to adjust the size of your images?

Krishna16 avatar Feb 20 '20 09:02 Krishna16

I don't think so. For the sizing matter, I only adjusted it from XML through constraintLayout. For my case, I display the gif and jpg images. But, basically png ones should be no problem, too.

Do u use library to load the image? If not, you can try using Glide. It's quite powerful in handling various types of image.

erwandy92 avatar Feb 21 '20 06:02 erwandy92

It should be related with ur layout or image loader .

smarteist avatar Feb 24 '20 13:02 smarteist

It should be related with ur layout or image loader .

I didn't get you. Can you be more specific?

Krishna16 avatar Feb 25 '20 19:02 Krishna16

How to add drawable pics in auto slider ...I can try (""+R.drawable.pic) but still it not work:'( only white screen displayed

priyayadav13 avatar Mar 08 '20 12:03 priyayadav13