From 9154f9b5084f461345d1ce1b6484dec0fce6230e Mon Sep 17 00:00:00 2001 From: serso Date: Sun, 1 Feb 2015 20:24:30 +0100 Subject: [PATCH] Fixed various styling issues --- android-app/src/main/AndroidManifest.xml | 2 +- .../calculator/view/UnitConverterViewBuilder.java | 8 +++----- .../calculator/wizard/WizardArrayAdapter.java | 3 ++- android-app/src/main/res/values-v21/theme.xml | 8 +++++++- android-app/src/main/res/values/colors.xml | 3 ++- android-app/src/main/res/values/theme.xml | 14 +++++++++++--- android-app/src/main/res/values/theme_gray.xml | 3 +-- 7 files changed, 27 insertions(+), 14 deletions(-) diff --git a/android-app/src/main/AndroidManifest.xml b/android-app/src/main/AndroidManifest.xml index 1a951d76..a5dddd38 100644 --- a/android-app/src/main/AndroidManifest.xml +++ b/android-app/src/main/AndroidManifest.xml @@ -71,7 +71,7 @@ - + diff --git a/android-app/src/main/java/org/solovyev/android/calculator/view/UnitConverterViewBuilder.java b/android-app/src/main/java/org/solovyev/android/calculator/view/UnitConverterViewBuilder.java index afbd4509..923b67d6 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/view/UnitConverterViewBuilder.java +++ b/android-app/src/main/java/org/solovyev/android/calculator/view/UnitConverterViewBuilder.java @@ -30,15 +30,13 @@ import android.text.TextWatcher; import android.view.View; import android.view.ViewGroup; import android.widget.*; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - import org.solovyev.android.calculator.R; import org.solovyev.android.view.ViewBuilder; import org.solovyev.android.view.ViewFromLayoutBuilder; import org.solovyev.common.units.*; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.util.Collections; import java.util.List; @@ -167,7 +165,7 @@ public class UnitConverterViewBuilder implements ViewBuilder { @Nonnull List> unitTypes) { final Spinner spinner = (Spinner) main.findViewById(spinnerId); - final ArrayAdapter> adapter = new ArrayAdapter>(context, android.R.layout.simple_spinner_item); + final ArrayAdapter> adapter = new ArrayAdapter>(context, R.layout.support_simple_spinner_dropdown_item); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); for (UnitType fromUnitType : unitTypes) { adapter.add(fromUnitType); diff --git a/android-app/src/main/java/org/solovyev/android/calculator/wizard/WizardArrayAdapter.java b/android-app/src/main/java/org/solovyev/android/calculator/wizard/WizardArrayAdapter.java index c11f67df..92fa6026 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/wizard/WizardArrayAdapter.java +++ b/android-app/src/main/java/org/solovyev/android/calculator/wizard/WizardArrayAdapter.java @@ -5,11 +5,12 @@ import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; +import org.solovyev.android.calculator.R; final class WizardArrayAdapter extends ArrayAdapter { public WizardArrayAdapter(Context context, int array) { - super(context, android.R.layout.simple_spinner_item, context.getResources().getStringArray(array)); + super(context, R.layout.support_simple_spinner_dropdown_item, context.getResources().getStringArray(array)); setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); } diff --git a/android-app/src/main/res/values-v21/theme.xml b/android-app/src/main/res/values-v21/theme.xml index 98738578..add792a3 100644 --- a/android-app/src/main/res/values-v21/theme.xml +++ b/android-app/src/main/res/values-v21/theme.xml @@ -37,8 +37,14 @@ @color/cpp_wizard_overscroll @color/cpp_wizard_primary @color/cpp_wizard_primary - @color/cpp_wizard_primary + @color/cpp_wizard_secondary @color/cpp_wizard_primary + + \ No newline at end of file diff --git a/android-app/src/main/res/values/colors.xml b/android-app/src/main/res/values/colors.xml index ed7fc753..683cf68b 100644 --- a/android-app/src/main/res/values/colors.xml +++ b/android-app/src/main/res/values/colors.xml @@ -28,8 +28,9 @@ #ffffff99 #ffffffff #ffffff99 - #ff000000 + #101010 #FAFAFA + #9E9E9E #212121 #FAFAFA #424242 diff --git a/android-app/src/main/res/values/theme.xml b/android-app/src/main/res/values/theme.xml index 35affbcd..6df57acd 100644 --- a/android-app/src/main/res/values/theme.xml +++ b/android-app/src/main/res/values/theme.xml @@ -26,7 +26,11 @@ - + - +