Merge pull request #1292 from yashshah7197/intent-dev

feat: Add checks for title and description in intent extras. (#1273)
This commit is contained in:
neslihanturan 2018-03-14 23:29:44 +02:00 committed by GitHub
commit e3e425c6ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,6 +101,14 @@ public class SingleUploadFragment extends CommonsDaggerSupportFragment {
View rootView = inflater.inflate(R.layout.fragment_single_upload, container, false);
ButterKnife.bind(this, rootView);
Intent activityIntent = getActivity().getIntent();
if (activityIntent.hasExtra("title")) {
titleEdit.setText(activityIntent.getStringExtra("title"));
}
if (activityIntent.hasExtra("description")) {
descEdit.setText(activityIntent.getStringExtra("description"));
}
ArrayList<String> licenseItems = new ArrayList<>();
licenseItems.add(getString(R.string.license_name_cc0));
licenseItems.add(getString(R.string.license_name_cc_by));