Android Open Source - image-rover Image Result Array Adapter

From Project

Back to project page image-rover.


The source code is released under:

MIT License

If you think the Android project image-rover listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.codepath.wangela.apps.image;
/* w w w  .j  a v  a 2s. com*/
import java.util.List;


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);

  public View getView(int position, View convertView, ViewGroup parent) {
    ImageResult imageInfo = this.getItem(position);
    SmartImageView ivImage;
    //ViewHolder viewHolder; // view lookup cache stored in tag
    // Check if an existing view is being reused; otherwise, inflate the view
    if (convertView == null) {
      //viewHolder = new ViewHolder();
      LayoutInflater inflater = LayoutInflater.from(getContext());
      ivImage = (SmartImageView) inflater.inflate(R.layout.item_image_result, parent, false);
    } else {
      //viewHolder = (ViewHolder) ivImage.getTag();
      ivImage = (SmartImageView) convertView;
    return ivImage;
  // View lookup cache
  //public static class ViewHolder {
  //  SmartImageView ivImage;

Java Source Code List