class Adapter extends BaseAdapter { private LayoutInflater mLayoutInflater; public Adapter() { mLayoutInflater = LayoutInflater.from(mContext); } public int getCount() { return 0; } public Object getItem(int position) { return null; } public long getItemId(int position) { return 0; } public View getView(final int position, View convertView, ViewGroup parent) { if(convertView == null) { convertView = mLayoutInflater.inflate(R.layout., parent, false); } return convertView; } }