Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use imageloader load picture appear black border #108

Closed
t2314862168 opened this issue Feb 19, 2016 · 5 comments
Closed

use imageloader load picture appear black border #108

t2314862168 opened this issue Feb 19, 2016 · 5 comments

Comments

@t2314862168
Copy link

@hdodenhof
my case is : enter Activity use imageloader to load testUrl_1 for CircleImageView , then use imageloader to load testUrl_2 for CircleImageView over and over again , then the CircleImageView appears black border.
my code is :

public static void displayImageAndInvalidate(String uri, ImageView imageView) {
        ImageAware imageAware = new ImageViewAware(imageView, false);
        ImageLoader.getInstance().displayImage(uri, imageAware,
                getCustomOptions());
// use invalidate , does't work
        imageView.invalidate();
    }

if Activity through onPause , then enter Activity , black border disappear,but if i operate change url ,it also .appear black border.
I don't why it happened , sorry for my bad english and please help me!!!

@hdodenhof
Copy link
Owner

I'm sorry, but I don't quite understand the events leading to your issue. Could you provide screenshots or a screencast?

@t2314862168
Copy link
Author

@hdodenhof
if i change the url many times ,the problem can appear,and the screenshots is below
qq 20160225103027
the normal is below
qq 20160225103111

and i find the solution , my code is :

public static void displayImageAndInvalidate(String uri,
            final ImageView imageView) {
        ImageAware imageAware = new ImageViewAware(imageView, false);
        ImageLoader.getInstance().displayImage(uri, imageAware,
                getCustomOptions(), new SimpleImageLoadingListener() {
                    @Override
                    public void onLoadingComplete(String imageUri, View view,
                            Bitmap loadedImage) {
                        // add this for the reason
                        imageView.setImageBitmap(null);
                        imageView.setImageBitmap(loadedImage);
                    }
                });
    }

before setImageBitmap(loadedImage) add setImageBitmap(null)
but i did't know why it happened.

@raiarainne
Copy link

I can see this issue when i use Picasso or Glide.
And I set image Url in this image vi
screenshot_2017-07-02-21-43-20
ew.
And this is my code part.
Picasso.with(this).load(imageurl).centerInside().placeholder(R.drawable.photo).noFade().fit().into(profileimage);

Sorry for my bad english.
Please give me solution of this issue

@raiarainne
Copy link

I found the reason of this issue in my case.
This issue was be occurred when i added click event on this image view.
And also i found solution from following link.
#153
if you check this solution carefully, you will solve your issue.
I hope this will be help you.
Thank you.

@hdodenhof
Copy link
Owner

Closing this as the original issue is most likely resolved by now (sorry for not getting back at all) and I can't reproduce it. Please reopen, if this still is an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants