@@ -0,0 +1,1818 @@
+package com.jaselogic.adamsonelearn;%0A%0Aimport java.util.ArrayList;%0A%0Aimport android.content.Context;%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0Aimport android.view.ViewGroup;%0Aimport android.widget.BaseAdapter;%0Aimport android.widget.TextView;%0A%0Apublic abstract class BaseListAdapter extends BaseAdapter %7B%0A%09private ArrayList%3CViewProducer%3E mListItems;%0A%09private LayoutInflater mLayoutInflater;%0A%09%0A%09public BaseListAdapter(Context context, ArrayList%3CViewProducer%3E arrayList) %7B%0A%09%09mListItems = arrayList;%0A%09%09mLayoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);%0A%09%7D%0A%09%0A    @Override%0A    public final int getItemViewType(int position) %7B%0A    %09// TODO Auto-generated method stub%0A    %09//return mListItems.get(position).viewType;%0A    %09//return 0;%0A    %09return mListItems.get(position).getViewTypeOrdinal();%0A    %7D%0A    %0A    @Override%0A    public final int getViewTypeCount() %7B%0A    %09return this.viewTypeCount();%0A    %7D%0A%0A%09@Override%0A    public final int getCount() %7B%0A        //getCount() represents how many items are in the list%0A        return mListItems.size();%0A    %7D%0A %0A    @Override%0A    //get the data of an item from a specific position%0A    //i represents the position of the item in the list%0A    public final Object getItem(int i) %7B%0A        return null;%0A    %7D%0A %0A    @Override%0A    //get the position id of the item from the list%0A    public final long getItemId(int i) %7B%0A        return 0;%0A    %7D%0A    %0A    @Override%0A    public final View getView(int position, View view, ViewGroup viewGroup) %7B%0A    %09return mListItems.get(position).produceView(view, mLayoutInflater);%0A    %7D%09%0A%0A%09public abstract int viewTypeCount();%0A%09%0A%09public interface ViewProducer %7B%0A%09%09public View produceView(View convertView, LayoutInflater inflater);%0A%09%09public int getLayoutId();%0A%09%09public int getViewTypeOrdinal();%0A%09%7D%0A%7D%0A

Add generic base list adapter