Code example for CursorAdapter

Methods: getActivity

0
	class RestaurantAdapter extends CursorAdapter
	{ 
		@SuppressWarnings("deprecation") 
		public RestaurantAdapter(Cursor c) 
		{ 
			super(getActivity(), c);
		} 
		 
		@Override 
		public void bindView(View row, Context context, Cursor cursor)
		{ 
			RestaurantHolder holder = (RestaurantHolder)row.getTag();
			 
			holder.populateFrom(cursor, helper);
		} 
		 
		@Override 
		public View newView(Context context, Cursor cursor, ViewGroup parent)
		{ 
			LayoutInflater inflater = getActivity().getLayoutInflater();
			View row = inflater.inflate(R.layout.restaurant_row, parent, false);