From 32941504d968697141f38a4543e3ad02c01e8465 Mon Sep 17 00:00:00 2001 From: serso Date: Sat, 10 Sep 2011 22:20:58 +0400 Subject: [PATCH] new interface implementation --- gen/org/solovyev/android/calculator/R.java | 113 +++++---- res/drawable/blue_button.xml | 21 ++ res/drawable/button.xml | 21 ++ res/layout/drag_button_calibration.xml | 55 +++-- res/layout/main.xml | 227 +++++++++++++----- res/values/colors.xml | 4 + res/values/styles.xml | 38 ++- .../calculator/CalculatorActivity.java | 20 +- .../DragButtonCalibrationActivity.java | 60 +++-- .../solovyev/android/view/ColorButton.java | 157 ++++++++++++ .../android/view/DirectionDragButton.java | 99 ++++++-- src/org/solovyev/android/view/DragButton.java | 19 +- .../android/view/FontSizeAdjuster.java | 14 ++ .../solovyev/android/view/PanelSwitcher.java | 144 +++++++++++ src/org/solovyev/util/StringUtils.java | 6 +- 15 files changed, 808 insertions(+), 190 deletions(-) create mode 100644 res/drawable/blue_button.xml create mode 100644 res/drawable/button.xml create mode 100644 res/values/colors.xml create mode 100644 src/org/solovyev/android/view/ColorButton.java create mode 100644 src/org/solovyev/android/view/FontSizeAdjuster.java create mode 100644 src/org/solovyev/android/view/PanelSwitcher.java diff --git a/gen/org/solovyev/android/calculator/R.java b/gen/org/solovyev/android/calculator/R.java index be166f9d..37993712 100644 --- a/gen/org/solovyev/android/calculator/R.java +++ b/gen/org/solovyev/android/calculator/R.java @@ -26,69 +26,82 @@ containing a value of this type. */ public static final int textUp=0x7f010000; } + public static final class color { + public static final int button_text=0x7f050001; + public static final int magic_flame=0x7f050000; + } public static final class drawable { - public static final int down=0x7f020000; - public static final int icon=0x7f020001; - public static final int not_ok=0x7f020002; - public static final int ok=0x7f020003; - public static final int up=0x7f020004; + public static final int blue_button=0x7f020000; + public static final int button=0x7f020001; + public static final int down=0x7f020002; + public static final int icon=0x7f020003; + public static final int not_ok=0x7f020004; + public static final int ok=0x7f020005; + public static final int up=0x7f020006; } public static final class id { - public static final int calibrationArrow=0x7f080000; - public static final int calibrationButton=0x7f080001; - public static final int calibrationStart=0x7f080002; - public static final int curlyBracketsButton=0x7f080016; - public static final int editText=0x7f080003; - public static final int eigthDigitButton=0x7f080012; - public static final int equalsButton=0x7f080014; - public static final int fiveDigitButton=0x7f08000c; - public static final int fourDigitButton=0x7f08000b; - public static final int historyButton=0x7f08001b; - public static final int menu_item_help=0x7f08001e; - public static final int menu_item_settings=0x7f08001d; - public static final int minusButton=0x7f08000f; - public static final int muliplicationButton=0x7f080008; - public static final int nineDigitButton=0x7f080013; - public static final int numericButton=0x7f080019; - public static final int oneDigitButton=0x7f080005; - public static final int piButton=0x7f08001c; - public static final int plusButton=0x7f080009; - public static final int pointDigitButton=0x7f080018; - public static final int resultEditText=0x7f080004; - public static final int roundBracketsButton=0x7f08000a; - public static final int sevenDigitButton=0x7f080011; - public static final int simplifyButton=0x7f08001a; - public static final int sixDigitButton=0x7f08000d; - public static final int sqrtButton=0x7f080015; - public static final int squareBracketsButton=0x7f080010; - public static final int subtractionButton=0x7f08000e; - public static final int threeDigitButton=0x7f080007; - public static final int twoDigitButton=0x7f080006; - public static final int zeroDigitButton=0x7f080017; + public static final int calibrationArrowLeft=0x7f090001; + public static final int calibrationArrowRight=0x7f090004; + public static final int calibrationButtonLeft=0x7f090002; + public static final int calibrationButtonRight=0x7f090003; + public static final int calibrationStart=0x7f090005; + public static final int curlyBracketsButton=0x7f09001b; + public static final int divisionButton=0x7f090011; + public static final int editText=0x7f090006; + public static final int eigthDigitButton=0x7f090014; + public static final int equalsButton=0x7f090016; + public static final int fiveDigitButton=0x7f09000f; + public static final int fourDigitButton=0x7f09000e; + public static final int historyButton=0x7f090020; + public static final int menu_item_help=0x7f090022; + public static final int menu_item_settings=0x7f090021; + public static final int muliplicationButton=0x7f09000c; + public static final int nineDigitButton=0x7f090015; + public static final int numericButton=0x7f09001e; + public static final int oneDigitButton=0x7f090009; + public static final int panelswitch=0x7f090008; + public static final int piButton=0x7f09001c; + public static final int plusButton=0x7f09000d; + public static final int pointDigitButton=0x7f09001d; + public static final int resultEditText=0x7f090007; + public static final int roundBracketsButton=0x7f090019; + public static final int sevenDigitButton=0x7f090013; + public static final int simplePad=0x7f090000; + public static final int simplifyButton=0x7f09001f; + public static final int sixDigitButton=0x7f090010; + public static final int sqrtButton=0x7f090017; + public static final int squareBracketsButton=0x7f09001a; + public static final int subtractionButton=0x7f090012; + public static final int threeDigitButton=0x7f09000b; + public static final int twoDigitButton=0x7f09000a; + public static final int zeroDigitButton=0x7f090018; } public static final class layout { public static final int drag_button_calibration=0x7f030000; public static final int main=0x7f030001; } public static final class menu { - public static final int main_menu=0x7f070000; + public static final int main_menu=0x7f080000; } public static final class string { - public static final int c_app_name=0x7f050000; - public static final int c_app_settings=0x7f050001; - public static final int c_down=0x7f050008; - public static final int c_help=0x7f050004; - public static final int c_prefs_drag_button_calibration=0x7f050006; - public static final int c_prefs_drag_button_calibration_summary=0x7f050007; - public static final int c_prefs_main_category=0x7f050005; - public static final int c_restart=0x7f05000a; - public static final int c_settings=0x7f050003; - public static final int c_up=0x7f050009; - public static final int syntax_error=0x7f050002; + public static final int c_app_name=0x7f060000; + public static final int c_app_settings=0x7f060001; + public static final int c_down=0x7f060008; + public static final int c_help=0x7f060004; + public static final int c_prefs_drag_button_calibration=0x7f060006; + public static final int c_prefs_drag_button_calibration_summary=0x7f060007; + public static final int c_prefs_main_category=0x7f060005; + public static final int c_restart=0x7f06000a; + public static final int c_settings=0x7f060003; + public static final int c_up=0x7f060009; + public static final int syntax_error=0x7f060002; } public static final class style { - public static final int digitButtonStyle=0x7f060001; - public static final int editTextInputStyle=0x7f060000; + public static final int button_small_style=0x7f070003; + public static final int button_style=0x7f070001; + public static final int digitButtonStyle=0x7f070002; + public static final int display_style=0x7f070004; + public static final int editTextInputStyle=0x7f070000; } public static final class xml { public static final int preferences=0x7f040000; diff --git a/res/drawable/blue_button.xml b/res/drawable/blue_button.xml new file mode 100644 index 00000000..f4d6059b --- /dev/null +++ b/res/drawable/blue_button.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/res/drawable/button.xml b/res/drawable/button.xml new file mode 100644 index 00000000..e5112ee1 --- /dev/null +++ b/res/drawable/button.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/res/layout/drag_button_calibration.xml b/res/layout/drag_button_calibration.xml index 93fbaef5..b01fdbc9 100644 --- a/res/layout/drag_button_calibration.xml +++ b/res/layout/drag_button_calibration.xml @@ -2,29 +2,46 @@ + a:layout_width="match_parent" + a:layout_height="match_parent" + a:background="#ff000000"> - + - + - + + + + + + + +