Code example for CursorAdapter

	public static class ViewHolder { 
		TextView text1;
	public MainAdapter(Context context) {
		super(context, null, 0);
		mInflater = LayoutInflater.from(context);
	public void bindView(View view, Context context, Cursor cursor) {
		ViewHolder holder = (ViewHolder) view.getTag();
		String name = cursor.getString(PROJECTION_NAME);
	public View newView(Context context, Cursor cursor, ViewGroup container) {
		ViewHolder holder = new ViewHolder();
		View view = mInflater.inflate(R.layout.main_list_item, container, false);
Connect your IDE to all the code out there  Get Codota for Java