CompanyRowAdapter.java :  » App » dclisp » my » app » company » Android Open Source

Android Open Source » App » dclisp 
dclisp » my » app » company » CompanyRowAdapter.java
package my.app.company;

import java.util.ArrayList;
import java.util.List;

import my.app.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;

public class CompanyRowAdapter extends ArrayAdapter<CompanyRowView>{

  ArrayList<CompanyRowView> items = null;
  
  public CompanyRowAdapter(Context context, int textViewResourceId, ArrayList<CompanyRowView> items) {
    super(context, textViewResourceId, items);
    this.items = items;
    // TODO Auto-generated constructor stub
  }
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
    
    View v = convertView;
        if (v == null) {
            LayoutInflater vi = (LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            v = vi.inflate(R.layout.taxi_list_row, null);
        }
        CompanyRowView t = items.get(position);
        return t;
  }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.