mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Force upload activity to has always DarkTheme to make it readable
This commit is contained in:
parent
231448c765
commit
9cc574c697
3 changed files with 22 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,13 +4,14 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_gravity="fill"
|
||||
android:orientation="vertical"
|
||||
android:background="#AA000000"
|
||||
android:background="?attr/fragmentCategorisationBackground"
|
||||
android:paddingBottom="8dip"
|
||||
android:paddingLeft="16dip"
|
||||
android:paddingStart="16dip"
|
||||
android:paddingRight="16dip"
|
||||
android:paddingEnd="16dip"
|
||||
android:paddingTop="8dip"
|
||||
android:theme="@style/DarkAppTheme"
|
||||
>
|
||||
|
||||
<EditText
|
||||
|
|
@ -32,16 +33,23 @@
|
|||
android:imeOptions="flagNoExtractUi"
|
||||
/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/licenseSpinner"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/LightAppTheme"
|
||||
>
|
||||
</Spinner>
|
||||
<Spinner
|
||||
android:id="@+id/licenseSpinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
</Spinner>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<Button
|
||||
android:text="@string/use_previous"
|
||||
android:background="#90000000"
|
||||
android:background="?attr/buttonBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/titleDescButton"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<color name="fragment_categorisation_background_dark">#AA000000</color>
|
||||
<color name="fragment_categorisation_background_light">#44ffffff</color>
|
||||
<color name="button_background_dark">#90000000</color>
|
||||
<color name="button_background_light">#60000000</color>
|
||||
<color name="button_background_light">#B0000000</color>
|
||||
<color name="upload_overlay_background_dark">#77000000</color>
|
||||
<color name="upload_overlay_background_light">#44000000</color>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue