Lint error: use of restricted API

This commit is contained in:
Paul Hawke 2017-09-03 17:00:16 -05:00
parent f74de55b60
commit d59a526f7f
2 changed files with 24 additions and 24 deletions

View file

@ -276,13 +276,13 @@ public class MediaDetailFragment extends Fragment {
categoryContainer.removeAllViews();
// @fixme add the category items
for (String cat : categoryNames) {
View catLabel = buildCatLabel(cat);
View catLabel = buildCatLabel(cat, categoryContainer);
categoryContainer.addView(catLabel);
}
}
private View buildCatLabel(final String catName) {
final View item = getLayoutInflater(null).inflate(R.layout.detail_category_item, null, false);
private View buildCatLabel(final String catName, ViewGroup categoryContainer) {
final View item = LayoutInflater.from(getContext()).inflate(R.layout.detail_category_item, categoryContainer, false);
final CompatTextView textView = (CompatTextView)item.findViewById(R.id.mediaDetailCategoryItemText);
textView.setText(catName);