mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Fixes 4019 (#4050)
Passed application context to adapter instead of the activity context
This commit is contained in:
parent
9202c3ac09
commit
8a860345fe
1 changed files with 2 additions and 2 deletions
|
|
@ -92,10 +92,10 @@ public class MediaLicenseFragment extends UploadBaseFragment implements MediaLic
|
|||
* Initialise the license spinner
|
||||
*/
|
||||
private void initLicenseSpinner() {
|
||||
if (getContext() == null) {
|
||||
if (getActivity() == null) {
|
||||
return;
|
||||
}
|
||||
adapter = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_dropdown_item);
|
||||
adapter = new ArrayAdapter<>(getActivity().getApplicationContext(), android.R.layout.simple_spinner_dropdown_item);
|
||||
spinnerLicenseList.setAdapter(adapter);
|
||||
spinnerLicenseList.setOnItemSelectedListener(new OnItemSelectedListener() {
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue