Source:
<code>public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); <START> LayoutInflater inflater = getLayoutInflater(savedInstanceState); <END> ViewHolder holder = createViewHolder(inflater, parent); holder.typeView.setIcon(Iconify.IconValue.fa_list_alt); holder.titleView.setText(R.string.courseware_title); holder.subtitleView.setText(R.string.courseware_subtitle); holder.rowView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Activity activity = getActivity(); if ( activity != null && activity instanceof ShowCourseOutlineCallback){ ((ShowCourseOutlineCallback)activity).showCourseOutline(); } } }); holder = createViewHolder(inflater, parent); holder.typeView.setIcon(Iconify.IconValue.fa_comments_o); holder.titleView.setText(R.string.discussion_title); holder.subtitleView.setText(R.string.discussion_subtitle); holder.rowView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { fetchCourseDiscussionMetaData(); } }); holder = createViewHolder(inflater, parent); holder.typeView.setIcon(Iconify.IconValue.fa_file_text_o); holder.titleView.setText(R.string.handouts_title); holder.subtitleView.setText(R.string.handouts_subtitle); holder.rowView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if ( courseData != null ) environment.getRouter().showHandouts(getActivity(), courseData); } }); holder = createViewHolder(inflater, parent); holder.typeView.setIcon(Iconify.IconValue.fa_bullhorn); holder.titleView.setText(R.string.announcement_title); holder.subtitleView.setText(R.string.announcement_subtitle); holder.rowView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if ( courseData != null ) environment.getRouter().showCourseAnnouncement(getActivity(), environment.getConfig(), courseData); } }); }</code><technical_language>getLayoutInflater() method is part of public API of Fragment, exposed in support library. Therefore, get LayoutInflater LayoutInflater.from() method</technical_language>

Target:
public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); LayoutInflater inflater = LayoutInflater.from(getActivity()); ViewHolder holder = createViewHolder(inflater, parent); holder.typeView.setIcon(Iconify.IconValue.fa_list_alt); holder.titleView.setText(R.string.courseware_title); holder.subtitleView.setText(R.string.courseware_subtitle); holder.rowView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Activity activity = getActivity(); if ( activity != null && activity instanceof ShowCourseOutlineCallback){ ((ShowCourseOutlineCallback)activity).showCourseOutline(); } } }); holder = createViewHolder(inflater, parent); holder.typeView.setIcon(Iconify.IconValue.fa_comments_o); holder.titleView.setText(R.string.discussion_title); holder.subtitleView.setText(R.string.discussion_subtitle); holder.rowView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { fetchCourseDiscussionMetaData(); } }); holder = createViewHolder(inflater, parent); holder.typeView.setIcon(Iconify.IconValue.fa_file_text_o); holder.titleView.setText(R.string.handouts_title); holder.subtitleView.setText(R.string.handouts_subtitle); holder.rowView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if ( courseData != null ) environment.getRouter().showHandouts(getActivity(), courseData); } }); holder = createViewHolder(inflater, parent); holder.typeView.setIcon(Iconify.IconValue.fa_bullhorn); holder.titleView.setText(R.string.announcement_title); holder.subtitleView.setText(R.string.announcement_subtitle); holder.rowView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if ( courseData != null ) environment.getRouter().showCourseAnnouncement(getActivity(), environment.getConfig(), courseData); } }); }