Force upload activity to has always DarkTheme to make it readable

This commit is contained in:
Neslihan 2017-03-16 19:11:49 +03:00
parent 231448c765
commit 9cc574c697
3 changed files with 22 additions and 6 deletions

View file

@ -4,6 +4,7 @@ import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import android.preference.ListPreference;
@ -112,6 +113,13 @@ public class SingleUploadFragment extends Fragment {
licenseSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
//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);
}
String licenseName = parent.getItemAtPosition(position).toString();
String license = Prefs.Licenses.CC_BY_SA_3; // default value