com.loopj.android.image.SmartImageView Java Examples
The following examples show how to use
com.loopj.android.image.SmartImageView.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MainActivity.java From Android-Basics-Codes with Artistic License 2.0 | 6 votes |
@Override public View getView(int position, View convertView, ViewGroup parent) { if (convertView == null) { convertView = View.inflate(MainActivity.this, R.layout.adapter_news_item, null); } TextView title = (TextView) convertView.findViewById(R.id.tv_title); TextView des = (TextView) convertView.findViewById(R.id.tv_des); TextView comment = (TextView) convertView .findViewById(R.id.tv_comment); // ��ʾ������Ŀ������ NewsBean bean = newsList.get(position); title.setText(bean.getTitle()); des.setText(bean.getDes()); comment.setText(bean.getComment()); // ��ʾͼƬ SmartImageView iv = (SmartImageView) convertView.findViewById(R.id.iv_news_pic); iv.setImageUrl(bean.getImage(),R.drawable.err); return convertView; }
Example #2
Source File: AppAdapter.java From block-this with GNU General Public License v3.0 | 5 votes |
@Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder; if (convertView == null) { convertView = inflater.inflate(R.layout.listview_whitelist, parent, false); // Create a ViewHolder and store references to the two children views holder = new ViewHolder(); holder.iconView = (SmartImageView) convertView.findViewById(R.id.appIcon); holder.appName = (TextView) convertView.findViewById(R.id.appName); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } ApplicationInfo data = applist.get(position); if (data != null){ holder.appName.setText(data.loadLabel(packageManager)); appNameV = (String) data.loadLabel(packageManager); holder.iconView.setImageDrawable(data.loadIcon(packageManager)); } return convertView; }