本文整理汇总了Java中cn.eoe.app.utils.ImageUtil.ImageCallback类的典型用法代码示例。如果您正苦于以下问题:Java ImageCallback类的具体用法?Java ImageCallback怎么用?Java ImageCallback使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ImageCallback类属于cn.eoe.app.utils.ImageUtil包,在下文中一共展示了ImageCallback类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initGridView
import cn.eoe.app.utils.ImageUtil.ImageCallback; //导入依赖的package包/类
private void initGridView() {
getData();
mAdapter = new SimpleAdapter(mContext, mList,
R.layout.user_gridview_item_medal, new String[] { "img" },
new int[] { R.id.user_imageview_medal }) {
@Override
public void setViewImage(ImageView v, String value) {
// TODO Auto-generated method stub
super.setViewImage(v, value);
ImageUtil.setThumbnailView(value, v, mContext,
new imageCallback(), false);
}
class imageCallback implements ImageCallback {
@Override
public void loadImage(Bitmap bitmap, String imagePath) {
// TODO Auto-generated method stub
try {
ImageView img = (ImageView) gvGrid
.findViewWithTag(imagePath);
img.setImageBitmap(bitmap);
} catch (NullPointerException ex) {
Log.e("error", "ImageView = null");
}
}
}
};
gvGrid.setAdapter(mAdapter);
}
示例2: initList
import cn.eoe.app.utils.ImageUtil.ImageCallback; //导入依赖的package包/类
private void initList() {
mlist = new ArrayList<Map<String, Object>>();
mAdapter = new SimpleAdapter(this, mlist,
R.layout.details_discuss_item, new String[] { "image", "name",
"content", "time" }, new int[] {
R.id.details_imageview_head,
R.id.details_textview_name,
R.id.details_textview_content,
R.id.details_textview_time }) {
@Override
public void setViewImage(ImageView v, String value) {
// TODO Auto-generated method stub
super.setViewImage(v, value);
ImageUtil.setThumbnailView(value, v,
DetailsDiscussActivity.this, callback, false);
}
ImageCallback callback = new ImageCallback() {
@Override
public void loadImage(Bitmap bitmap, String imagePath) {
// TODO Auto-generated method stub
try {
ImageView img = (ImageView) mListview
.findViewWithTag(imagePath);
img.setImageBitmap(bitmap);
} catch (Exception e) {
e.printStackTrace();
}
}
};
};
mListview.setAdapter(mAdapter);
}