From 8fee55a17e9b7c3334e38c80488e3358b7f0ece4 Mon Sep 17 00:00:00 2001 From: Sergey Solovyev Date: Sun, 22 Apr 2012 00:37:41 +0400 Subject: [PATCH] Conversion tool --- calculatorpp/project.properties | 2 +- calculatorpp/res/layout/unit_converter.xml | 74 ++++++ calculatorpp/res/menu/main_menu.xml | 4 + calculatorpp/res/values/text_strings.xml | 1 + .../solovyev/android/NumeralBaseUnitType.java | 83 ++++++ .../main/java/org/solovyev/android/Unit.java | 17 ++ .../org/solovyev/android/UnitConverter.java | 42 ++++ .../java/org/solovyev/android/UnitImpl.java | 42 ++++ .../java/org/solovyev/android/UnitType.java | 16 ++ .../calculator/CalculatorActivity.java | 9 +- .../android/calculator/CalculatorDisplay.java | 6 +- .../android/calculator/CalculatorModel.java | 6 +- .../view/NumeralBaseConverterDialog.java | 105 ++++++++ .../view/UnitConverterViewBuilder.java | 236 ++++++++++++++++++ .../calculator/view/UnitsConverter.java | 9 - .../android/NumeralBaseUnitTypeTest.java | 69 +++++ pom.xml | 2 +- 17 files changed, 703 insertions(+), 20 deletions(-) create mode 100644 calculatorpp/res/layout/unit_converter.xml create mode 100644 calculatorpp/src/main/java/org/solovyev/android/NumeralBaseUnitType.java create mode 100644 calculatorpp/src/main/java/org/solovyev/android/Unit.java create mode 100644 calculatorpp/src/main/java/org/solovyev/android/UnitConverter.java create mode 100644 calculatorpp/src/main/java/org/solovyev/android/UnitImpl.java create mode 100644 calculatorpp/src/main/java/org/solovyev/android/UnitType.java create mode 100644 calculatorpp/src/main/java/org/solovyev/android/calculator/view/NumeralBaseConverterDialog.java create mode 100644 calculatorpp/src/main/java/org/solovyev/android/calculator/view/UnitConverterViewBuilder.java delete mode 100644 calculatorpp/src/main/java/org/solovyev/android/calculator/view/UnitsConverter.java create mode 100644 calculatorpp/src/test/java/org/solovyev/android/NumeralBaseUnitTypeTest.java diff --git a/calculatorpp/project.properties b/calculatorpp/project.properties index 3e8758ec..febda8cf 100644 --- a/calculatorpp/project.properties +++ b/calculatorpp/project.properties @@ -10,5 +10,5 @@ # Project target. target=android-15 android.library.reference.1=../calculatorpp-service -android.library.reference.2=gen-external-apklibs/org.solovyev.android_common_0.1.2 +android.library.reference.2=gen-external-apklibs/org.solovyev.android_common_0.1.3 diff --git a/calculatorpp/res/layout/unit_converter.xml b/calculatorpp/res/layout/unit_converter.xml new file mode 100644 index 00000000..5c4a3273 --- /dev/null +++ b/calculatorpp/res/layout/unit_converter.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + +