private void showPhoto(boolean refresh) {
// Load high res photo into the single image view
ImageView photoImage = (ImageView) findViewById(R.id.photo_image);
String url = null;
if (getIntent().hasExtra("userName")) {
url = ImageUrls.getUserPhotoHighResUrl(getIntent().getStringExtra("userName"));
} else if (getIntent().hasExtra("beerId")) {
url = ImageUrls.getBeerPhotoHighResUrl(getIntent().getLongExtra("beerId", 0));
}
if (refresh) {
Picasso.with(this).invalidate(url);
Picasso.with(this).load(url).networkPolicy(NetworkPolicy.NO_CACHE).into(photoImage);
} else {
Picasso.with(this).load(url).into(photoImage);
}
}
PhotoActivity.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:ratebeer
作者:
评论列表
文章目录