mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 13:53:54 +01:00
Lint error: use of restricted API
This commit is contained in:
parent
f74de55b60
commit
d59a526f7f
2 changed files with 24 additions and 24 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue