M
M
Michael2015-03-11 12:51:14
Android
Michael, 2015-03-11 12:51:14

Why is the image not displayed in the ImageView when the src is filled?

Hello, I am writing a small application for android and when testing on different phones, I noticed incomprehensible behavior.
I have a ListView whose items have an ImageView that I fill through the loader found on the Internet ( here ).
If I use LG G2 phone everything is displayed fine, but as soon as I run the application on Sony Xperia M2 the image is not displayed at all. According to the debug - loading and assigning the src parameter ( imageView.setImageBitmap(bitmap); ) in the ImageView works fine. But it doesn't show up on the phone.
Workaround made the next one. Except imageView.setImageBitmap(bitmap); i force fill the backgroundimageView.setBackgroundDrawable(new BitmapDrawable(bitmap)); , after which the images are normally displayed as they should be.
In addition to the ListView with pictures, the same display mechanism (through the loader ) is used in other places. But there it works fine on any device.
Please let me know if anyone else has come across this problem and is there a better solution? Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question