Code example for CursorAdapter

Methods: getActivity

0
	} 
	 
	private class RestaurantAdapter extends CursorAdapter {
		 
		RestaurantAdapter(Cursor c) {
			super(getActivity(), c);
		} 
 
		@Override 
		public void bindView(View row, Context ctxt, Cursor c) {
			RestaurantHolder holder = (RestaurantHolder) row.getTag();
			holder.populateFrom(c, helper);
		} 
 
		@Override 
		public View newView(Context ctxt, Cursor c,	ViewGroup parent) {
			LayoutInflater inflater = getActivity().getLayoutInflater();
			RestaurantHelper rh = new RestaurantHelper(ctxt);
 
			int typeId;
			String t = rh.getType(c);