FileDocCategorySizeDatePackage
ArrayAdapter.javaAPI DocAndroid 1.5 API2115Wed May 06 22:41:08 BST 2009com.android.development

ArrayAdapter

public abstract class ArrayAdapter extends android.widget.BaseAdapter

Fields Summary
private final android.content.Context
mContext
private final android.view.LayoutInflater
mInflater
private final int
mLayoutRes
private List
mList
Constructors Summary
public ArrayAdapter(android.content.Context context, int layoutRes)

        mContext = context;
        mInflater = (LayoutInflater)context.getSystemService(
            Context.LAYOUT_INFLATER_SERVICE);
        mLayoutRes = layoutRes;
    
Methods Summary
public abstract voidbindView(android.view.View view, E item)

public intgetCount()

        return mList != null ? mList.size() : 0;
    
public java.lang.ObjectgetItem(int position)

        return position;
    
public longgetItemId(int position)

        return position;
    
public android.view.ViewgetView(int position, android.view.View convertView, android.view.ViewGroup parent)

        View view;
        if (convertView == null) {
            view = mInflater.inflate(mLayoutRes, parent, false);
        } else {
            view = convertView;
        }
        bindView(view, mList.get(position));
        return view;
    
public EitemForPosition(int position)

        if (mList == null) {
            return null;
        }

        return mList.get(position);
    
public voidsetSource(java.util.List list)

        mList = list;