Back to project page GreenGear.
The source code is released under:
MIT License
If you think the Android project GreenGear 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.bradleycurran.velocadapter; /*from w ww . j a va 2s . c o m*/ import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import com.bradleycurran.viewquery.ViewQuery; public abstract class VelocAdapter extends BaseAdapter implements ViewBinder { private Context mContext; public VelocAdapter(Context context) { mContext = context; } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { View view = convertView; if (convertView == null) { view = newView(LayoutInflater.from(mContext), position, parent); view.setTag(new ViewQuery(view)); } ViewQuery query = (ViewQuery)view.getTag(); bindView(mContext, view, query, position); return view; } public Context getContext() { return mContext; } }