Last active
August 29, 2015 14:14
-
-
Save jaydp17/bdb96e4564e10c035155 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DummyActivity extends ActionBarActivity { | |
File f; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.dummylayout); | |
// This image exists | |
f = new File(getFilesDir(), "abc.png"); | |
final ImageView image = (ImageView) findViewById(R.id.imageView); | |
Button loadBtn = (Button) findViewById(R.id.load); | |
Button invalidateBtn = (Button) findViewById(R.id.invalidate); | |
Picasso.with(DummyActivity.this).load(f).into(image); | |
loadBtn.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View view) { | |
Picasso.with(DummyActivity.this).load(f).into(image); | |
} | |
}); | |
invalidateBtn.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View view) { | |
Picasso.with(DummyActivity.this).invalidate(f); | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment