I'm new to Android programming, and I'm studying how to create a personal Adapter for a ListView and on tutorial in the new Adapter's constructor has this lines:
public class RecipeAdapter extends BaseAdapter {
private Context mContext;
private LayoutInflater mInflater;
private ArrayList<Recipe> mDataSource;
public RecipeAdapter(Context context, ArrayList<Recipe> items) {
mContext = context;
mDataSource = items;
mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
}
The tutorial doesn't describe what is exactly Context
and what this line does: mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
and I dont understand it.
Can you describe them?