diff --git a/app/src/main/java/fr/free/nrw/commons/AboutActivity.java b/app/src/main/java/fr/free/nrw/commons/AboutActivity.java index fdb58292e..d5c31d820 100644 --- a/app/src/main/java/fr/free/nrw/commons/AboutActivity.java +++ b/app/src/main/java/fr/free/nrw/commons/AboutActivity.java @@ -1,5 +1,7 @@ package fr.free.nrw.commons; +import android.content.Intent; +import android.net.Uri; import android.os.Bundle; import android.text.Html; import android.text.method.LinkMovementMethod; @@ -16,6 +18,7 @@ public class AboutActivity extends BaseActivity { @BindView(R.id.about_improve) TextView improveText; @BindView(R.id.about_privacy_policy) TextView privacyPolicyText; @BindView(R.id.about_uploads_to) TextView uploadsToText; + @BindView(R.id.about_credits) TextView creditsText; @Override public void onCreate(Bundle savedInstanceState) { @@ -35,10 +38,12 @@ public class AboutActivity extends BaseActivity { fixFormatting(licenseText, R.string.about_license); fixFormatting(improveText, R.string.about_improve); fixFormatting(privacyPolicyText, R.string.about_privacy_policy); + fixFormatting(creditsText, R.string.about_credits); licenseText.setMovementMethod(LinkMovementMethod.getInstance()); improveText.setMovementMethod(LinkMovementMethod.getInstance()); privacyPolicyText.setMovementMethod(LinkMovementMethod.getInstance()); + creditsText.setMovementMethod(LinkMovementMethod.getInstance()); } private void fixFormatting(TextView textView, int resource) { diff --git a/app/src/main/java/fr/free/nrw/commons/upload/SingleUploadFragment.java b/app/src/main/java/fr/free/nrw/commons/upload/SingleUploadFragment.java index f05c3e915..7b4c4631e 100644 --- a/app/src/main/java/fr/free/nrw/commons/upload/SingleUploadFragment.java +++ b/app/src/main/java/fr/free/nrw/commons/upload/SingleUploadFragment.java @@ -92,6 +92,7 @@ public class SingleUploadFragment extends Fragment { View rootView = inflater.inflate(R.layout.fragment_single_upload, null); ButterKnife.bind(this, rootView); + ArrayList licenseItems = new ArrayList<>(); licenseItems.add(getString(R.string.license_name_cc0)); licenseItems.add(getString(R.string.license_name_cc_by)); @@ -104,7 +105,15 @@ public class SingleUploadFragment extends Fragment { Log.d("Single Upload fragment", license); - ArrayAdapter adapter = new ArrayAdapter<>(getActivity(), android.R.layout.simple_spinner_dropdown_item, licenseItems); + ArrayAdapter adapter; + if (PreferenceManager.getDefaultSharedPreferences(getActivity()).getBoolean("theme",true)) { + // dark theme + adapter = new ArrayAdapter<>(getActivity(), android.R.layout.simple_spinner_dropdown_item, licenseItems); + }else { + // light theme + adapter = new ArrayAdapter<>(getActivity(), R.layout.light_simple_spinner_dropdown_item, licenseItems); + } + licenseSpinner.setAdapter(adapter); int position = licenseItems.indexOf(getString(Utils.licenseNameFor(license))); @@ -136,6 +145,13 @@ public class SingleUploadFragment extends Fragment { @OnItemSelected(R.id.licenseSpinner) void onLicenseSelected(AdapterView parent, View view, int position, long id) { String licenseName = parent.getItemAtPosition(position).toString(); + // Set selected color to white because it should be readable on random images. + TextView selectedText = (TextView) licenseSpinner.getChildAt(0); + if (selectedText != null ) { + selectedText.setTextColor(Color.WHITE); + selectedText.setBackgroundColor(Color.TRANSPARENT); + } + String license = Prefs.Licenses.CC_BY_SA_3; // default value if(getString(R.string.license_name_cc0).equals(licenseName)) { license = Prefs.Licenses.CC0; diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml index 715210023..03534619e 100644 --- a/app/src/main/res/layout/activity_about.xml +++ b/app/src/main/res/layout/activity_about.xml @@ -57,6 +57,16 @@ android:text="@string/about_privacy_policy" /> + + + diff --git a/app/src/main/res/menu/fragment_contributions_list.xml b/app/src/main/res/menu/fragment_contributions_list.xml index 46b77637e..b8e6cbcc3 100644 --- a/app/src/main/res/menu/fragment_contributions_list.xml +++ b/app/src/main/res/menu/fragment_contributions_list.xml @@ -2,28 +2,14 @@ xmlns:app="http://schemas.android.com/apk/res-auto"> - - - + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a6100a47d..d6bc96d9c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -77,6 +77,7 @@ Tap this message (or hit back) to skip this step. Open Source software released under the <a href=\"https://github.com/wikimedia/apps-android-commons/blob/master/COPYING\">Apache License v2</a>. Wikimedia Commons and its logo are trademarks of the Wikimedia Foundation and are used with the permission of the Wikimedia Foundation. We are not endorsed by or affiliated with the Wikimedia Foundation. <a href=\"https://github.com/commons-app/apps-android-commons\">Source</a> and <a href=\"https://commons-app.github.io/\">website</a> on GitHub. Create a new <a href=\"https://github.com/commons-app/apps-android-commons/issues\">GitHub issue</a> for bug reports and suggestions. <a href=\"https://wikimediafoundation.org/wiki/Privacy_policy\">Privacy policy</a> + <a href=\"https://github.com/commons-app/apps-android-commons/blob/master/CREDITS\">CREDITS</a> About Send Feedback (via Email) No email client installed