Code example for CursorAdapter

Methods: getActivity

    class AssignmentAdapter extends CursorAdapter {
    	AssignmentAdapter(Cursor c) {
    		super(getActivity(), c);
    	public void bindView(View row, Context ctxt, Cursor c) {
    		AssignmentHolder holder = (AssignmentHolder)row.getTag();
    		holder.populateFrom(c, helper);
    	public View newView(Context ctxt, Cursor c, ViewGroup parent) {
    		LayoutInflater inflater = getActivity().getLayoutInflater();
    		View row = inflater.inflate(R.layout.row, parent, false);
    		AssignmentHolder holder = new AssignmentHolder(row);
Connect your IDE to all the code out there  Get Codota for Java