Code example for ResourceCursorAdapter

0
	private static final String TAG = "TaskCursorAdapter";
	 
	private MainActivity mMainActivity;
	 
	public TaskCursorAdapter(MainActivity mainActivity, int layout, Context context, Cursor c) {
		super(context, layout, c);
		mMainActivity = mainActivity;
	} 
 
	@Override 
	public void bindView(View view, Context context, Cursor cursor) {
		ViewHolder holder = (ViewHolder) view.getTag();
		 
		if (holder == null) {
			holder = new ViewHolder();
			holder.handle = (ImageView) view.findViewById(R.id.taskHandle);
			holder.title = (TextView) view.findViewById(R.id.taskTitle);
			holder.due = (TextView) view.findViewById(R.id.taskDueDate);
			 
			view.setTag(holder);
		}