sirvon
sirvon

Reputation: 2625

Android ImageView wont clear

I have this url being loaded into an imageview by picasso

    Intent intent = getIntent();
    sceneUrl = intent.getStringExtra("url");
    image = (ImageView)findViewById(R.id.imageView1);
    Picasso.with(this).load(sceneUrl).into(image);

This activity is being started from a broadcast receiver via intent...

                                Intent scene = new Intent( context, Image.class );
                                scene.putExtra("url", output);
                                scene.addFlags(Intent.FLAG_FROM_BACKGROUND);
                                scene.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                                scene.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); 
                                context.startActivity(scene); 

Everytime i broadcast a new intent meaning a new image, the same image shows when the activity pops up. What isn't being cleared? is it picasso or the imageview or the activity... something is stuck and is keeping the old url/image around

Upvotes: 1

Views: 364

Answers (1)

Digvesh Patel
Digvesh Patel

Reputation: 6533

 Picasso.with(this).load(sceneUrl).skipMemoryCache().into(image);

Upvotes: 1

Related Questions