本文整理汇总了Java中m.framework.ui.widget.asyncview.AsyncImageView类的典型用法代码示例。如果您正苦于以下问题:Java AsyncImageView类的具体用法?Java AsyncImageView怎么用?Java AsyncImageView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AsyncImageView类属于m.framework.ui.widget.asyncview包,在下文中一共展示了AsyncImageView类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setData
import m.framework.ui.widget.asyncview.AsyncImageView; //导入依赖的package包/类
public void setData(int position) {
//TODO 设置listview的view
app = adapter.getItem(position);
tv_title.setText(app.title);
tv_msg.setText(app.text);
imv_download.setOnClickListener(this);
if (adapter.isFling()) {
Bitmap bm = BitmapProcessor.getBitmapFromCache(app.iconUrl);
if (bm != null && !bm.isRecycled()) {
imv_icon.setImageBitmap(bm);
} else {
imv_icon.execute(null, AsyncImageView.DEFAULT_TRANSPARENT);
}
} else {
imv_icon.execute(app.iconUrl);
}
}
开发者ID:BigAppOS,项目名称:BigApp_Discuz_Android,代码行数:19,代码来源:APPAdapter.java
示例2: getView
import m.framework.ui.widget.asyncview.AsyncImageView; //导入依赖的package包/类
public View getView(int position, View convertView, ViewGroup parent) {
FollowListItem item = null;
if (convertView == null) {
LinearLayout llItem = new LinearLayout(parent.getContext());
item = new FollowListItem();
llItem.setTag(item);
convertView = llItem;
item.aivIcon = new AsyncImageView(getContext());
int dp_52 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 52);
int dp_10 = cn.sharesdk.framework.utils.R.dipToPx(parent.getContext(), 10);
int dp_5 = cn.sharesdk.framework.utils.R.dipToPx(parent.getContext(), 5);
LinearLayout.LayoutParams lpIcon = new LinearLayout.LayoutParams(dp_52, dp_52);
lpIcon.gravity = Gravity.CENTER_VERTICAL;
lpIcon.setMargins(dp_10, dp_5, dp_10, dp_5);
item.aivIcon.setLayoutParams(lpIcon);
llItem.addView(item.aivIcon);
LinearLayout llText = new LinearLayout(parent.getContext());
llText.setPadding(0, dp_10, dp_10, dp_10);
llText.setOrientation(LinearLayout.VERTICAL);
LinearLayout.LayoutParams lpText = new LinearLayout.LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
lpText.gravity = Gravity.CENTER_VERTICAL;
lpText.weight = 1;
llText.setLayoutParams(lpText);
llItem.addView(llText);
item.tvName = new TextView(parent.getContext());
item.tvName.setTextColor(0xff000000);
item.tvName.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18);
item.tvName.setSingleLine();
llText.addView(item.tvName);
item.tvSign = new TextView(parent.getContext());
item.tvSign.setTextColor(0x7f000000);
item.tvSign.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14);
item.tvSign.setSingleLine();
llText.addView(item.tvSign);
item.ivCheck = new ImageView(parent.getContext());
item.ivCheck.setPadding(0, 0, dp_10, 0);
LinearLayout.LayoutParams lpCheck = new LinearLayout.LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
lpCheck.gravity = Gravity.CENTER_VERTICAL;
item.ivCheck.setLayoutParams(lpCheck);
llItem.addView(item.ivCheck);
} else {
item = (FollowListItem) convertView.getTag();
}
Following following = getItem(position);
item.tvName.setText(following.screeName);
item.tvSign.setText(following.description);
item.ivCheck.setImageBitmap(following.checked ? bmChd : bmUnch);
if (isFling()) {
Bitmap bm = BitmapProcessor.getBitmapFromCache(following.icon);
if (bm != null && !bm.isRecycled()) {
item.aivIcon.setImageBitmap(bm);
} else {
item.aivIcon.execute(null, AsyncImageView.DEFAULT_TRANSPARENT);
}
} else {
item.aivIcon.execute(following.icon);
}
if (position == getCount() - 1) {
next();
}
return convertView;
}
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:72,代码来源:FollowList.java
注:本文中的m.framework.ui.widget.asyncview.AsyncImageView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论