Back to project page ImageSearch.
The source code is released under:
MIT License
If you think the Android project ImageSearch listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.crimsonresearch.imagesearch; /*from www . j av a 2 s . c om*/ import java.util.List; import com.loopj.android.image.SmartImageView; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; public class ImageResultArrayAdapter extends ArrayAdapter<ImageResult> { public ImageResultArrayAdapter(Context context, List<ImageResult> images) { super(context, R.layout.item_image_result, images); } @Override public View getView(int position, View convertView, ViewGroup parent) { ImageResult imageInfo = this.getItem(position); SmartImageView ivImage; if(convertView == null) { LayoutInflater inflater = LayoutInflater.from(getContext()); ivImage = (SmartImageView)inflater.inflate(R.layout.item_image_result, parent, false); } else { ivImage = (SmartImageView)convertView; ivImage.setImageResource(android.R.color.transparent); } ivImage.setImageUrl(imageInfo.getThumbUrl()); return ivImage; } }