FileDocCategorySizeDatePackage
AccountViewAdapter.javaAPI DocAndroid 5.1 API3691Thu Mar 12 22:22:10 GMT 2015com.android.internal.widget

AccountViewAdapter

public class AccountViewAdapter extends android.widget.BaseAdapter

Fields Summary
private List
mData
private android.content.Context
mContext
Constructors Summary
public AccountViewAdapter(android.content.Context context, List data)
Constructor

param
context The context where the View associated with this Adapter is running
param
data A list with AccountElements data type. The list contains the data of each account and the each member of AccountElements will correspond to one item view.

        mContext = context;
        mData = data;
    
Methods Summary
public intgetCount()

        return mData.size();
    
public java.lang.ObjectgetItem(int position)

        return mData.get(position);
    
public longgetItemId(int position)

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

        AccountItemView view;
        if (convertView == null) {
            view = new AccountItemView(mContext);
        } else {
            view = (AccountItemView) convertView;
        }
        AccountElements elements = (AccountElements) getItem(position);
        view.setViewItem(elements);
        return view;
    
public voidupdateData(java.util.List data)

        mData = data;
        notifyDataSetChanged();