Use our context's layout inflater

This commit is contained in:
tonymanou 2019-02-26 22:34:09 +01:00
parent cdcd9844a5
commit 9bae5fb333

View file

@ -325,7 +325,7 @@ public class AppListAdapter extends RecyclerView.Adapter<AppListAdapter.ViewHold
if (mLabelDisabled == null) {
mLabelDisabled = viewGroup.getContext().getString(R.string.list_item_disabled);
}
LayoutInflater inflater = viewGroup.getContext().getSystemService(LayoutInflater.class);
LayoutInflater inflater = LayoutInflater.from(viewGroup.getContext());
View view = inflater.inflate(R.layout.app_list_item, viewGroup, false);
ViewHolder vh = new ViewHolder(view);
vh.setIndex(i);