Back to project page Wardrobe_app.
The source code is released under:
Apache License
If you think the Android project Wardrobe_app listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.android.busolo.apps.wardrobe.engine.adapter; //w ww .j av a 2 s. com import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import java.util.ArrayList; /** * Created by james on 30/06/14. */ public abstract class ViewInflaterBaseAdapter<T> extends BaseAdapter { private ArrayList<T> arrayList; private ViewInflater inflater; public ViewInflaterBaseAdapter(ViewInflater inflater){ this.inflater = inflater; arrayList = new ArrayList<T>(); } public ViewInflaterBaseAdapter(ViewInflater inflater, ArrayList<T> data){ this.inflater = inflater; arrayList = data; } public void setInflater(ViewInflater inflater){ this.inflater = inflater; } @Override public int getCount() { return arrayList.size(); } @Override public T getItem(int position) { return arrayList.get(position); } @Override public long getItemId(int position) { return 0; } @Override public View getView(int position, View convertView, ViewGroup parent){ return inflater != null ? inflater.inflate(this, position, convertView, parent) : null; } public interface ViewInflater<T>{ View inflate (ViewInflaterBaseAdapter<T> adapter, int pos, View ConvertView, ViewGroup parent); } }