JGuizard
2/28/2016 - 11:59 AM

Implementation of base adapter for listvie

Implementation of base adapter for listvie

public class myBaseAdapter extends BaseAdapter
{
    private final static String CLASS_TAG = "myBaseAdapter";

    public AnswerAdapter(Activity activity)
    {
        this.activity=activity;
    }

    public View getView(int position, View convertView, ViewGroup parent)
    {
        LayoutInflater layoutInflater = LayoutInflater.from(activity);
        convertView = layoutInflater.inflate(R.layout.item_answer, null);
        TextView tvLetter = (TextView)convertView.findViewById(R.id.btLetter);

        return convertView;
    }

    @Override
    public int getCount()
    {
        return items.size();
        //return 4;
    }

    @Override
    public Object getItem(int position)
    {
        return item.get(position);
    }

    @Override
    public long getItemId(int position)
    {
        return 0;
    }

}