From 70ff5a109e1eddf7373a5b8bc8328fddcb044a12 Mon Sep 17 00:00:00 2001 From: serso Date: Sat, 16 Jul 2011 23:25:12 +0400 Subject: [PATCH] drag button calibration --- AndroidManifest.xml | 23 +-- gen/org/solovyev/android/calculator/R.java | 82 ++++++---- res/layout/drag_button_calibration.xml | 27 ++++ res/menu/main_menu.xml | 9 ++ res/values-ru/strings.xml | 2 +- res/values/strings.xml | 11 +- res/xml/preferences.xml | 20 +++ ...alculator.java => CalculatorActivity.java} | 144 ++++++++++++------ .../CalculatorPreferencesActivity.java | 44 ++++++ .../DragButtonCalibrationActivity.java | 140 +++++++++++++++++ src/org/solovyev/android/view/DragButton.java | 20 ++- .../solovyev/android/view/DragDirection.java | 4 +- src/org/solovyev/android/view/DragEvent.java | 15 +- .../android/view/SimpleOnDragListener.java | 124 +++++++-------- src/org/solovyev/util/math/MathUtils.java | 28 +++- 15 files changed, 532 insertions(+), 161 deletions(-) create mode 100644 res/layout/drag_button_calibration.xml create mode 100644 res/menu/main_menu.xml create mode 100644 res/xml/preferences.xml rename src/org/solovyev/android/calculator/{Calculator.java => CalculatorActivity.java} (63%) create mode 100644 src/org/solovyev/android/calculator/CalculatorPreferencesActivity.java create mode 100644 src/org/solovyev/android/calculator/DragButtonCalibrationActivity.java diff --git a/AndroidManifest.xml b/AndroidManifest.xml index c6e6e261..0fa5d311 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -4,15 +4,20 @@ package="org.solovyev.android.calculator" versionCode="1" versionName="1.0"> - - - - - - - - + - + + + + + + + + + + + + + \ No newline at end of file diff --git a/gen/org/solovyev/android/calculator/R.java b/gen/org/solovyev/android/calculator/R.java index 10453268..33366b49 100644 --- a/gen/org/solovyev/android/calculator/R.java +++ b/gen/org/solovyev/android/calculator/R.java @@ -30,43 +30,63 @@ containing a value of this type. public static final int icon=0x7f020000; } public static final class id { - public static final int curlyBracketsButton=0x7f060013; - public static final int editText=0x7f060000; - public static final int eigthDigitButton=0x7f06000f; - public static final int equalsButton=0x7f060011; - public static final int fiveDigitButton=0x7f060009; - public static final int fourDigitButton=0x7f060008; - public static final int historyButton=0x7f060018; - public static final int minusButton=0x7f06000c; - public static final int muliplicationButton=0x7f060005; - public static final int nineDigitButton=0x7f060010; - public static final int numericButton=0x7f060016; - public static final int oneDigitButton=0x7f060002; - public static final int piButton=0x7f060019; - public static final int plusButton=0x7f060006; - public static final int pointDigitButton=0x7f060015; - public static final int resultEditText=0x7f060001; - public static final int roundBracketsButton=0x7f060007; - public static final int sevenDigitButton=0x7f06000e; - public static final int simplifyButton=0x7f060017; - public static final int sixDigitButton=0x7f06000a; - public static final int sqrtButton=0x7f060012; - public static final int squareBracketsButton=0x7f06000d; - public static final int subtractionButton=0x7f06000b; - public static final int threeDigitButton=0x7f060004; - public static final int twoDigitButton=0x7f060003; - public static final int zeroDigitButton=0x7f060014; + public static final int calibrationButton=0x7f080000; + public static final int calibrationStart=0x7f080001; + public static final int curlyBracketsButton=0x7f080015; + public static final int editText=0x7f080002; + public static final int eigthDigitButton=0x7f080011; + public static final int equalsButton=0x7f080013; + public static final int fiveDigitButton=0x7f08000b; + public static final int fourDigitButton=0x7f08000a; + public static final int historyButton=0x7f08001a; + public static final int menu_item_help=0x7f08001d; + public static final int menu_item_settings=0x7f08001c; + public static final int minusButton=0x7f08000e; + public static final int muliplicationButton=0x7f080007; + public static final int nineDigitButton=0x7f080012; + public static final int numericButton=0x7f080018; + public static final int oneDigitButton=0x7f080004; + public static final int piButton=0x7f08001b; + public static final int plusButton=0x7f080008; + public static final int pointDigitButton=0x7f080017; + public static final int resultEditText=0x7f080003; + public static final int roundBracketsButton=0x7f080009; + public static final int sevenDigitButton=0x7f080010; + public static final int simplifyButton=0x7f080019; + public static final int sixDigitButton=0x7f08000c; + public static final int sqrtButton=0x7f080014; + public static final int squareBracketsButton=0x7f08000f; + public static final int subtractionButton=0x7f08000d; + public static final int threeDigitButton=0x7f080006; + public static final int twoDigitButton=0x7f080005; + public static final int zeroDigitButton=0x7f080016; } public static final class layout { - public static final int main=0x7f030000; + 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 class string { - public static final int app_name_caption=0x7f040000; - public static final int syntax_error=0x7f040001; + 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 class style { - public static final int digitButtonStyle=0x7f050001; - public static final int editTextInputStyle=0x7f050000; + public static final int digitButtonStyle=0x7f060001; + public static final int editTextInputStyle=0x7f060000; + } + public static final class xml { + public static final int preferences=0x7f040000; } public static final class styleable { /** Attributes that can be used with a DragButton. diff --git a/res/layout/drag_button_calibration.xml b/res/layout/drag_button_calibration.xml new file mode 100644 index 00000000..c77f4f2e --- /dev/null +++ b/res/layout/drag_button_calibration.xml @@ -0,0 +1,27 @@ + + + + + + + +