mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 13:23:58 +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();
|
categoryContainer.removeAllViews();
|
||||||
// @fixme add the category items
|
// @fixme add the category items
|
||||||
for (String cat : categoryNames) {
|
for (String cat : categoryNames) {
|
||||||
View catLabel = buildCatLabel(cat);
|
View catLabel = buildCatLabel(cat, categoryContainer);
|
||||||
categoryContainer.addView(catLabel);
|
categoryContainer.addView(catLabel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private View buildCatLabel(final String catName) {
|
private View buildCatLabel(final String catName, ViewGroup categoryContainer) {
|
||||||
final View item = getLayoutInflater(null).inflate(R.layout.detail_category_item, null, false);
|
final View item = LayoutInflater.from(getContext()).inflate(R.layout.detail_category_item, categoryContainer, false);
|
||||||
final CompatTextView textView = (CompatTextView)item.findViewById(R.id.mediaDetailCategoryItemText);
|
final CompatTextView textView = (CompatTextView)item.findViewById(R.id.mediaDetailCategoryItemText);
|
||||||
|
|
||||||
textView.setText(catName);
|
textView.setText(catName);
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ public class MultipleUploadListFragment extends Fragment {
|
||||||
UploadHolderView holder;
|
UploadHolderView holder;
|
||||||
|
|
||||||
if (view == null) {
|
if (view == null) {
|
||||||
view = getLayoutInflater(null).inflate(R.layout.layout_upload_item, null);
|
view = LayoutInflater.from(getContext()).inflate(R.layout.layout_upload_item, viewGroup, false);
|
||||||
holder = new UploadHolderView();
|
holder = new UploadHolderView();
|
||||||
holder.image = (SimpleDraweeView) view.findViewById(R.id.uploadImage);
|
holder.image = (SimpleDraweeView) view.findViewById(R.id.uploadImage);
|
||||||
holder.title = (TextView) view.findViewById(R.id.uploadTitle);
|
holder.title = (TextView) view.findViewById(R.id.uploadTitle);
|
||||||
|
|
@ -159,7 +159,7 @@ public class MultipleUploadListFragment extends Fragment {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
View view = inflater.inflate(R.layout.fragment_multiple_uploads_list, null);
|
View view = inflater.inflate(R.layout.fragment_multiple_uploads_list, container, false);
|
||||||
photosGrid = (GridView) view.findViewById(R.id.multipleShareBackground);
|
photosGrid = (GridView) view.findViewById(R.id.multipleShareBackground);
|
||||||
baseTitle = (EditText) view.findViewById(R.id.multipleBaseTitle);
|
baseTitle = (EditText) view.findViewById(R.id.multipleBaseTitle);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue