Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

changed package to com.android2.calculator3

matrix scrollable, dot product, cross product
  • Loading branch information...
commit 365fa8054f12cc1ecb3aa653e53485d59092f435 1 parent 7160c24
@Xlythe authored
Showing with 513 additions and 695 deletions.
  1. +1 −1  AndroidManifest.xml
  2. BIN  bin/android_packages_apps_Calculator.apk
  3. BIN  bin/classes.dex
  4. BIN  bin/classes/com/android/calculator3/BuildConfig.class
  5. BIN  bin/classes/com/android/calculator3/Calculator$PageAdapter.class
  6. BIN  bin/classes/com/android/calculator3/Calculator.class
  7. BIN  bin/classes/com/android/calculator3/CalculatorDisplay$1.class
  8. BIN  bin/classes/com/android/calculator3/CalculatorDisplay$Scroll.class
  9. BIN  bin/classes/com/android/calculator3/CalculatorDisplay.class
  10. BIN  bin/classes/com/android/calculator3/CalculatorEditText$MenuHandler.class
  11. BIN  bin/classes/com/android/calculator3/CalculatorEditText$NoTextSelectionMode.class
  12. BIN  bin/classes/com/android/calculator3/CalculatorEditText.class
  13. BIN  bin/classes/com/android/calculator3/CalculatorEditable$Factory.class
  14. BIN  bin/classes/com/android/calculator3/CalculatorEditable.class
  15. BIN  bin/classes/com/android/calculator3/CalculatorViewPager.class
  16. BIN  bin/classes/com/android/calculator3/ColorButton.class
  17. BIN  bin/classes/com/android/calculator3/EventListener.class
  18. BIN  bin/classes/com/android/calculator3/History.class
  19. BIN  bin/classes/com/android/calculator3/HistoryAdapter.class
  20. BIN  bin/classes/com/android/calculator3/HistoryEntry.class
  21. BIN  bin/classes/com/android/calculator3/Logic$Listener.class
  22. BIN  bin/classes/com/android/calculator3/Logic.class
  23. BIN  bin/classes/com/android/calculator3/PanelSwitcher$1.class
  24. BIN  bin/classes/com/android/calculator3/PanelSwitcher$Listener.class
  25. BIN  bin/classes/com/android/calculator3/PanelSwitcher.class
  26. BIN  bin/classes/com/android/calculator3/Persist.class
  27. BIN  bin/classes/com/android/calculator3/R$array.class
  28. BIN  bin/classes/com/android/calculator3/R$attr.class
  29. BIN  bin/classes/com/android/calculator3/R$color.class
  30. BIN  bin/classes/com/android/calculator3/R$dimen.class
  31. BIN  bin/classes/com/android/calculator3/R$drawable.class
  32. BIN  bin/classes/com/android/calculator3/R$id.class
  33. BIN  bin/classes/com/android/calculator3/R$integer.class
  34. BIN  bin/classes/com/android/calculator3/R$layout.class
  35. BIN  bin/classes/com/android/calculator3/R$menu.class
  36. BIN  bin/classes/com/android/calculator3/R$mipmap.class
  37. BIN  bin/classes/com/android/calculator3/R$string.class
  38. BIN  bin/classes/com/android/calculator3/R$style.class
  39. BIN  bin/classes/com/android/calculator3/R.class
  40. BIN  bin/resources.ap_
  41. +0 −6 gen/com/android/calculator3/BuildConfig.java
  42. +0 −295 gen/com/android/calculator3/R.java
  43. BIN  res/drawable-hdpi/matrix_background.9.png
  44. +10 −10 res/layout-land/advanced_pad.xml
  45. +6 −6 res/layout-land/function_pad.xml
  46. +7 −7 res/layout-land/main.xml
  47. +12 −11 res/layout-land/matrix_pad.xml
  48. +18 −18 res/layout-land/simple_pad.xml
  49. +12 −12 res/layout-port/advanced_pad.xml
  50. +10 −10 res/layout-port/function_pad.xml
  51. +7 −7 res/layout-port/main.xml
  52. +11 −11 res/layout-port/matrix_pad.xml
  53. +16 −16 res/layout-port/simple_pad.xml
  54. +10 −10 res/layout-sw600dp-land/function_pad.xml
  55. +6 −6 res/layout-sw600dp-land/main.xml
  56. +11 −11 res/layout-sw600dp-land/matrix_pad.xml
  57. +6 −6 res/layout-sw600dp/main.xml
  58. +11 −11 res/layout-sw600dp/matrix_pad.xml
  59. +13 −3 res/layout/matrix.xml
  60. +3 −1 res/values/strings.xml
  61. +0 −110 src/com/android/calculator3/CalculatorEditable.java
  62. +1 −13 src/com/{android → android2}/calculator3/Calculator.java
  63. +1 −1  src/com/{android → android2}/calculator3/CalculatorDisplay.java
  64. +1 −1  src/com/{android → android2}/calculator3/CalculatorEditText.java
  65. +1 −1  src/com/{android → android2}/calculator3/CalculatorViewPager.java
  66. +1 −1  src/com/{android → android2}/calculator3/ColorButton.java
  67. +1 −1  src/com/{android → android2}/calculator3/EventListener.java
  68. +1 −1  src/com/{android → android2}/calculator3/Graph.java
  69. +1 −1  src/com/{android → android2}/calculator3/History.java
  70. +1 −1  src/com/{android → android2}/calculator3/HistoryAdapter.java
  71. +1 −1  src/com/{android → android2}/calculator3/HistoryEntry.java
  72. +120 −36 src/com/{android → android2}/calculator3/Logic.java
  73. +84 −54 src/com/{android → android2}/calculator3/MatrixFragment.java
  74. +1 −1  src/com/{android → android2}/calculator3/PanelSwitcher.java
  75. +1 −1  src/com/{android → android2}/calculator3/Persist.java
  76. +1 −1  src/com/{android → android2}/calculator3/WolframAlpha.java
  77. +114 −0 src/net/sf/jchemistry/util/CommonMathUtils.java
  78. +3 −3 tests/AndroidManifest.xml
  79. +5 −5 tests/src/com/android/calculator3/CalculatorHitSomeButtons.java
  80. +2 −2 tests/src/com/android/calculator3/CalculatorInstrumentationTestRunner.java
  81. +2 −2 tests/src/com/android/calculator3/tests/CalculatorLaunchPerformance.java
View
2  AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.calculator3"
+ package="com.android2.calculator3"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="auto">
View
BIN  bin/android_packages_apps_Calculator.apk
Binary file not shown
View
BIN  bin/classes.dex
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/BuildConfig.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/Calculator$PageAdapter.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/Calculator.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/CalculatorDisplay$1.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/CalculatorDisplay$Scroll.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/CalculatorDisplay.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/CalculatorEditText$MenuHandler.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/CalculatorEditText$NoTextSelectionMode.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/CalculatorEditText.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/CalculatorEditable$Factory.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/CalculatorEditable.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/CalculatorViewPager.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/ColorButton.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/EventListener.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/History.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/HistoryAdapter.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/HistoryEntry.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/Logic$Listener.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/Logic.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/PanelSwitcher$1.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/PanelSwitcher$Listener.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/PanelSwitcher.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/Persist.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/R$array.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/R$attr.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/R$color.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/R$dimen.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/R$drawable.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/R$id.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/R$integer.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/R$layout.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/R$menu.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/R$mipmap.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/R$string.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/R$style.class
Binary file not shown
View
BIN  bin/classes/com/android/calculator3/R.class
Binary file not shown
View
BIN  bin/resources.ap_
Binary file not shown
View
6 gen/com/android/calculator3/BuildConfig.java
@@ -1,6 +0,0 @@
-/** Automatically generated file. DO NOT MODIFY */
-package com.android.calculator3;
-
-public final class BuildConfig {
- public final static boolean DEBUG = true;
-}
View
295 gen/com/android/calculator3/R.java
@@ -1,295 +0,0 @@
-/* AUTO-GENERATED FILE. DO NOT MODIFY.
- *
- * This class was automatically generated by the
- * aapt tool from the resource data it found. It
- * should not be modified by hand.
- */
-
-package com.android.calculator3;
-
-public final class R {
- public static final class array {
- public static final int advanced_buttons=0x7f050002;
- public static final int buttons=0x7f050003;
- public static final int function_buttons=0x7f050000;
- public static final int simple_buttons=0x7f050001;
- }
- public static final class attr {
- }
- public static final class color {
- public static final int button_text=0x7f060001;
- public static final int magic_flame=0x7f060000;
- }
- public static final class dimen {
- public static final int btn_clear_text_size=0x7f0a0003;
- public static final int btn_digit_text_size=0x7f0a0000;
- public static final int btn_function_text_size=0x7f0a0002;
- public static final int btn_operation_text_size=0x7f0a0001;
- public static final int display_text_size=0x7f0a0004;
- public static final int group_padding=0x7f0a0007;
- public static final int left_right_padding=0x7f0a0005;
- public static final int top_bottom_padding=0x7f0a0006;
- }
- public static final class drawable {
- public static final int advanced=0x7f020000;
- public static final int btn_digit=0x7f020001;
- public static final int btn_function=0x7f020002;
- public static final int btn_keyboard_key_dark_normal_holo=0x7f020003;
- public static final int btn_keyboard_key_dark_pressed_holo=0x7f020004;
- public static final int btn_keyboard_key_light_normal_holo=0x7f020005;
- public static final int btn_keyboard_key_light_pressed_holo=0x7f020006;
- public static final int calc_clear_symbol=0x7f020007;
- public static final int calculator_input_field=0x7f020008;
- public static final int clear_history=0x7f020009;
- public static final int function=0x7f02000a;
- public static final int graph=0x7f02000b;
- public static final int grip_bar_land=0x7f02000c;
- public static final int grip_bar_port=0x7f02000d;
- public static final int ic_menu_overflow=0x7f02000e;
- public static final int matrix=0x7f02000f;
- public static final int matrix_add_button=0x7f020010;
- public static final int matrix_add_button_press=0x7f020011;
- public static final int matrix_add_drawable=0x7f020012;
- public static final int matrix_background=0x7f020013;
- public static final int simple=0x7f020014;
- }
- public static final class id {
- public static final int X=0x7f080011;
- public static final int Y=0x7f080012;
- public static final int advanced=0x7f080047;
- public static final int advancedPad=0x7f080003;
- public static final int basic=0x7f080048;
- public static final int clear=0x7f080020;
- public static final int clear_history=0x7f080043;
- public static final int coma=0x7f080019;
- public static final int cos=0x7f080005;
- public static final int del=0x7f080021;
- public static final int determinant=0x7f08002f;
- public static final int digit0=0x7f08003f;
- public static final int digit1=0x7f08003c;
- public static final int digit2=0x7f08003d;
- public static final int digit3=0x7f08003e;
- public static final int digit4=0x7f080036;
- public static final int digit5=0x7f080037;
- public static final int digit6=0x7f080038;
- public static final int digit7=0x7f080032;
- public static final int digit8=0x7f080033;
- public static final int digit9=0x7f080034;
- public static final int display=0x7f08001e;
- public static final int div=0x7f08003a;
- public static final int dot=0x7f080039;
- public static final int dx=0x7f080015;
- public static final int dy=0x7f08001a;
- public static final int e=0x7f08000b;
- public static final int eigenvalue=0x7f08002e;
- public static final int equal=0x7f080040;
- public static final int factorial=0x7f080008;
- public static final int function=0x7f080046;
- public static final int functionPad=0x7f080016;
- public static final int graph=0x7f080045;
- public static final int graphPad=0x7f08001b;
- public static final int graphView=0x7f080000;
- public static final int grip_bar_land=0x7f080027;
- public static final int grip_bar_port=0x7f080026;
- public static final int historyExpr=0x7f08001c;
- public static final int historyResult=0x7f08001d;
- public static final int integral=0x7f080014;
- public static final int largePanelswitch=0x7f080024;
- public static final int leftParen=0x7f08000e;
- public static final int lg=0x7f08000a;
- public static final int ln=0x7f080009;
- public static final int matrices=0x7f080002;
- public static final int matrix=0x7f080044;
- public static final int matrixAdd=0x7f080001;
- public static final int matrixButtons=0x7f080028;
- public static final int matrixFragment=0x7f08002d;
- public static final int matrixMul=0x7f08002a;
- public static final int matrixPad=0x7f08002c;
- public static final int matrixPlus=0x7f080029;
- public static final int matrixPopup=0x7f080025;
- public static final int minus=0x7f08003b;
- public static final int mod=0x7f080018;
- public static final int mul=0x7f080035;
- public static final int ok=0x7f08002b;
- public static final int overflow_menu=0x7f08001f;
- public static final int panelswitch=0x7f080022;
- public static final int parentheses=0x7f080017;
- public static final int pi=0x7f080007;
- public static final int plus=0x7f080041;
- public static final int power=0x7f08000c;
- public static final int rightParen=0x7f08000f;
- public static final int simplePad=0x7f080031;
- public static final int sin=0x7f080004;
- public static final int smallPanelswitch=0x7f080023;
- public static final int solve=0x7f080030;
- public static final int solveForX=0x7f080010;
- public static final int solveForY=0x7f080013;
- public static final int sqrt=0x7f08000d;
- public static final int tan=0x7f080006;
- public static final int theMatrix=0x7f080042;
- }
- public static final class integer {
- public static final int max_digits=0x7f070000;
- }
- public static final class layout {
- public static final int advanced_pad=0x7f040000;
- public static final int function_pad=0x7f040001;
- public static final int graph_pad=0x7f040002;
- public static final int history_item=0x7f040003;
- public static final int main=0x7f040004;
- public static final int matrix=0x7f040005;
- public static final int matrix_pad=0x7f040006;
- public static final int simple_pad=0x7f040007;
- public static final int single_matrix_input_box=0x7f040008;
- public static final int the_matrix=0x7f040009;
- }
- public static final class menu {
- public static final int menu=0x7f0c0000;
- }
- public static final class mipmap {
- public static final int ic_launcher_calculator=0x7f030000;
- }
- public static final class string {
- public static final int X=0x7f090025;
- public static final int Y=0x7f090026;
- /** Menu item text to take user to the screen with the advanced functions, such as sin, cos, ln, log, etc.
- */
- public static final int advanced=0x7f090022;
- /** Application name
- */
- public static final int app_name=0x7f090000;
- /** Menu item text to take user to the screen with the basic digits and operators.
- */
- public static final int basic=0x7f090021;
- /** Button name on screen to clear the entire calculation field. [CHAR LIMIT=6]
- */
- public static final int clear=0x7f09000d;
- /** Menu item text to clear the calculation history.
- */
- public static final int clear_history=0x7f090023;
- public static final int coma=0x7f09002e;
- /** Displayed on buttons on screen for the cos function.
- */
- public static final int cos=0x7f090016;
- public static final int defaultGraphTitle=0x7f09002f;
- /** Button name on screen to delete the last entered digit or operator
- */
- public static final int del=0x7f09000c;
- public static final int determinant=0x7f090035;
- /** Displayed numbers for the digit buttons
- */
- public static final int digit0=0x7f090002;
- /** Displayed numbers for the digit buttons
- */
- public static final int digit1=0x7f090003;
- /** Displayed numbers for the digit buttons
- */
- public static final int digit2=0x7f090004;
- /** Displayed numbers for the digit buttons
- */
- public static final int digit3=0x7f090005;
- /** Displayed numbers for the digit buttons
- */
- public static final int digit4=0x7f090006;
- /** Displayed numbers for the digit buttons
- */
- public static final int digit5=0x7f090007;
- /** Displayed numbers for the digit buttons
- */
- public static final int digit6=0x7f090008;
- /** Displayed numbers for the digit buttons
- */
- public static final int digit7=0x7f090009;
- /** Displayed numbers for the digit buttons
- */
- public static final int digit8=0x7f09000a;
- /** Displayed numbers for the digit buttons
- */
- public static final int digit9=0x7f09000b;
- /** Do not translate. Unicode division sign; don't translate. Displayed as button on screen.
- */
- public static final int div=0x7f09000e;
- /** Do not translate. Decimal point; don't translate. Displayed as button on screen.
- */
- public static final int dot=0x7f090012;
- public static final int dx=0x7f090027;
- public static final int dy=0x7f090028;
- /** Displayed on buttons on screen for the e function.
- */
- public static final int e=0x7f090019;
- public static final int eigenvalue=0x7f090036;
- /** Do not translate. Down arrow; don't translate. Displayed as button on screen.
- */
- public static final int enter=0x7f090014;
- /** Do not translate. Equal sign; don't translate. Displayed as button on screen.
- */
- public static final int equal=0x7f090013;
- /** If there is a syntax error in the user entered calculation, an error dialog will appear. This is the title.
- */
- public static final int error=0x7f090001;
- /** Do not translate.
- */
- public static final int factorial=0x7f090020;
- public static final int function=0x7f090033;
- public static final int graph=0x7f090032;
- public static final int graphTitle=0x7f090030;
- public static final int integral=0x7f09002b;
- public static final int inverse=0x7f090034;
- /** Displayed on buttons on screen for a left parenthesis.
- */
- public static final int leftParen=0x7f09001c;
- /** Displayed on buttons on screen for the log function.
- */
- public static final int lg=0x7f09001b;
- /** Displayed on buttons on screen for the ln function.
- */
- public static final int ln=0x7f09001a;
- public static final int matrix=0x7f090031;
- /** Do not translate. Unicode minus sign; don't translate. Displayed as button on screen.
- */
- public static final int minus=0x7f090011;
- public static final int mod=0x7f09002d;
- /** Do not translate. Unicode multiplication sign; don't translate. Displayed as button on screen.
- */
- public static final int mul=0x7f09000f;
- public static final int parentheses=0x7f09002c;
- /** Do not translate. Unicode pi sign; don't translate. Displayed as button on screen.
- */
- public static final int pi=0x7f090018;
- /** Do not translate. Plus sign, displayed as button on screen
- */
- public static final int plus=0x7f090010;
- /** Do not translate. Displayed on buttons on screen.
- */
- public static final int power=0x7f09001f;
- /** Displayed on buttons on screen for a right parenthesis.
- */
- public static final int rightParen=0x7f09001d;
- /** Displayed on buttons on screen for the sin function.
- */
- public static final int sin=0x7f090015;
- public static final int solve=0x7f090037;
- public static final int solveForX=0x7f090029;
- public static final int solveForY=0x7f09002a;
- /** Do not translate. Unicode square root sign; don't translate. Displayed on button on screen.
- */
- public static final int sqrt=0x7f09001e;
- /** Displayed on buttons on screen for the tan function.
- */
- public static final int tan=0x7f090017;
- /** Toast shown when text is copied to the clipboard.
- */
- public static final int text_copied_toast=0x7f090024;
- }
- public static final class style {
- public static final int btn_clear=0x7f0b0008;
- public static final int btn_digit_cell_style=0x7f0b0007;
- public static final int btn_function_cell_style=0x7f0b0005;
- public static final int btn_operation_cell_style=0x7f0b0006;
- public static final int btn_row_style=0x7f0b0004;
- public static final int button_small_style=0x7f0b0002;
- public static final int button_style=0x7f0b0000;
- public static final int digit_button_style=0x7f0b0001;
- public static final int display_style=0x7f0b0003;
- }
-}
View
BIN  res/drawable-hdpi/matrix_background.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
20 res/layout-land/advanced_pad.xml
@@ -32,27 +32,27 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/sin"
android:text="@string/sin"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/cos"
android:text="@string/cos"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/tan"
android:text="@string/tan"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/pi"
android:text="@string/pi"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/factorial"
android:text="@string/factorial"
style="@style/button_style"
@@ -64,27 +64,27 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/ln"
android:text="@string/ln"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/lg"
android:text="@string/lg"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/e"
android:text="@string/e"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/power"
android:text="@string/power"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/sqrt"
android:text="@string/sqrt"
style="@style/button_style"
View
12 res/layout-land/function_pad.xml
@@ -32,7 +32,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/solveForX"
android:text="@string/solveForX"
android:textSize="34dp"
@@ -40,14 +40,14 @@
android:layout_weight="2"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/X"
android:text="@string/X"
android:layout_width="0dp"
android:layout_weight="1"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/Y"
android:text="@string/Y"
android:layout_width="0dp"
@@ -61,7 +61,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/solveForY"
android:text="@string/solveForY"
android:textSize="34dp"
@@ -69,14 +69,14 @@
android:layout_weight="2"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/integral"
android:text="@string/integral"
android:layout_width="0dp"
android:layout_weight="1"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/dx"
android:text="@string/dx"
android:layout_width="0dp"
View
14 res/layout-land/main.xml
@@ -29,19 +29,19 @@
android:layout_weight="2"
>
- <com.android.calculator3.CalculatorDisplay
+ <com.android2.calculator3.CalculatorDisplay
android:id="@+id/display"
android:layout_width="0dp"
android:layout_weight="5"
android:layout_height="match_parent"
maxDigits="@integer/max_digits">
- <com.android.calculator3.CalculatorEditText
+ <com.android2.calculator3.CalculatorEditText
style="@style/display_style" />
- <com.android.calculator3.CalculatorEditText
+ <com.android2.calculator3.CalculatorEditText
style="@style/display_style" />
- </com.android.calculator3.CalculatorDisplay>
+ </com.android2.calculator3.CalculatorDisplay>
<ImageButton android:id="@+id/overflow_menu"
android:layout_width="48dip"
android:layout_height="match_parent"
@@ -54,7 +54,7 @@
android:layout_weight="1"
android:layout_height="match_parent">
<!-- marginRight has to be 0 to catch border-touch -->
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/clear"
android:text="@string/clear"
android:layout_width="match_parent"
@@ -64,7 +64,7 @@
style="@style/button_style"
/>
<!-- marginRight has to be 0 to catch border-touch -->
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/del"
android:text="@string/del"
android:layout_width="match_parent"
@@ -76,7 +76,7 @@
</FrameLayout>
</LinearLayout>
- <com.android.calculator3.CalculatorViewPager
+ <com.android2.calculator3.CalculatorViewPager
android:id="@+id/panelswitch"
android:layout_width="match_parent"
android:layout_height="0dp"
View
23 res/layout-land/matrix_pad.xml
@@ -1,36 +1,37 @@
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/matrixPad"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="vertical"
+ android:orientation="horizontal"
android:layout_gravity="center"
>
- <fragment class="com.android.calculator3.MatrixFragment"
+ <fragment class="com.android2.calculator3.MatrixFragment"
android:id="@+id/matrixFragment"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
/>
<LinearLayout
- android:layout_width="wrap_content"
+ android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:layout_alignParentRight="true"
+ android:layout_weight="4"
android:orientation="vertical"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/eigenvalue"
android:text="@string/eigenvalue"
android:paddingLeft="10dp"
android:paddingRight="10dp"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/determinant"
android:text="@string/determinant"
android:paddingLeft="10dp"
android:paddingRight="10dp"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/solve"
android:text="@string/solve"
android:paddingLeft="10dp"
@@ -38,4 +39,4 @@
style="@style/button_small_style"
/>
</LinearLayout>
-</RelativeLayout>
+</LinearLayout>
View
36 res/layout-land/simple_pad.xml
@@ -30,32 +30,32 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit7"
android:text="@string/digit7"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit8"
android:text="@string/digit8"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit9"
android:text="@string/digit9"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/leftParen"
android:text="@string/leftParen"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/rightParen"
android:text="@string/rightParen"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/mul"
android:text="@string/mul"
style="@style/button_style"
@@ -67,32 +67,32 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit4"
android:text="@string/digit4"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit5"
android:text="@string/digit5"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit6"
android:text="@string/digit6"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/dot"
android:text="@string/dot"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/div"
android:text="@string/div"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/minus"
android:text="@string/minus"
style="@style/button_style"
@@ -104,32 +104,32 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit1"
android:text="@string/digit1"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit2"
android:text="@string/digit2"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit3"
android:text="@string/digit3"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit0"
android:text="@string/digit0"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/equal"
android:text="@string/equal"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/plus"
android:text="@string/plus"
style="@style/button_style"
View
24 res/layout-port/advanced_pad.xml
@@ -31,17 +31,17 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/sin"
android:text="@string/sin"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/cos"
android:text="@string/cos"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/tan"
android:text="@string/tan"
style="@style/button_small_style"
@@ -53,17 +53,17 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/ln"
android:text="@string/ln"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/lg"
android:text="@string/lg"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/factorial"
android:text="@string/factorial"
style="@style/button_style"
@@ -75,17 +75,17 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/pi"
android:text="@string/pi"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/e"
android:text="@string/e"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/power"
android:text="@string/power"
style="@style/button_style"
@@ -97,17 +97,17 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/leftParen"
android:text="@string/leftParen"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/rightParen"
android:text="@string/rightParen"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/sqrt"
android:text="@string/sqrt"
style="@style/button_style"
View
20 res/layout-port/function_pad.xml
@@ -31,17 +31,17 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/parentheses"
android:text="@string/parentheses"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/mod"
android:text="@string/mod"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/coma"
android:text="@string/coma"
style="@style/button_style"
@@ -53,14 +53,14 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/solveForX"
android:text="@string/solveForX"
android:textSize="26dp"
android:layout_weight="1"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/X"
android:text="@string/X"
android:layout_weight="2"
@@ -73,14 +73,14 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/solveForY"
android:text="@string/solveForY"
android:textSize="26dp"
android:layout_weight="1"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/Y"
android:text="@string/Y"
android:layout_weight="2"
@@ -93,17 +93,17 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/integral"
android:text="@string/integral"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/dx"
android:text="@string/dx"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/dy"
android:text="@string/dy"
style="@style/button_style"
View
14 res/layout-port/main.xml
@@ -32,19 +32,19 @@
android:layout_gravity="center_vertical"
android:gravity="center_vertical">
- <com.android.calculator3.CalculatorDisplay
+ <com.android2.calculator3.CalculatorDisplay
android:id="@+id/display"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"
maxDigits="@integer/max_digits">
- <com.android.calculator3.CalculatorEditText
+ <com.android2.calculator3.CalculatorEditText
style="@style/display_style" />
- <com.android.calculator3.CalculatorEditText
+ <com.android2.calculator3.CalculatorEditText
style="@style/display_style" />
- </com.android.calculator3.CalculatorDisplay>
+ </com.android2.calculator3.CalculatorDisplay>
<ImageButton android:id="@+id/overflow_menu"
android:layout_width="48dip"
android:layout_height="match_parent"
@@ -71,7 +71,7 @@
android:layout_weight="1"
android:layout_height="match_parent">
<!-- marginRight has to be 0 to catch border-touch -->
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/clear"
android:text="@string/clear"
android:layout_width="match_parent"
@@ -81,7 +81,7 @@
style="@style/button_style"
/>
<!-- marginRight has to be 0 to catch border-touch -->
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/del"
android:text="@string/del"
android:layout_width="match_parent"
@@ -93,7 +93,7 @@
</FrameLayout>
</LinearLayout>
- <com.android.calculator3.CalculatorViewPager
+ <com.android2.calculator3.CalculatorViewPager
android:id="@+id/panelswitch"
android:layout_width="match_parent"
android:layout_height="0dp"
View
22 res/layout-port/matrix_pad.xml
@@ -1,35 +1,35 @@
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/matrixPad"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_gravity="center"
>
- <fragment class="com.android.calculator3.MatrixFragment"
+ <fragment class="com.android2.calculator3.MatrixFragment"
android:id="@+id/matrixFragment"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
/>
<LinearLayout
android:layout_width="fill_parent"
- android:layout_height="75dp"
- android:layout_alignParentBottom="true"
- android:layout_alignParentRight="true"
+ android:layout_height="fill_parent"
+ android:layout_weight="4"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/eigenvalue"
android:text="@string/eigenvalue"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/determinant"
android:text="@string/determinant"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/solve"
android:text="@string/solve"
style="@style/button_small_style"
/>
</LinearLayout>
-</RelativeLayout>
+</LinearLayout>
View
32 res/layout-port/simple_pad.xml
@@ -30,22 +30,22 @@
android:layout_weight="3"
android:layout_width="match_parent"
android:layout_height="0dp">
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit7"
android:text="@string/digit7"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit8"
android:text="@string/digit8"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit9"
android:text="@string/digit9"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/div"
android:text="@string/div"
style="@style/button_style"
@@ -57,22 +57,22 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit4"
android:text="@string/digit4"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit5"
android:text="@string/digit5"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit6"
android:text="@string/digit6"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/mul"
android:text="@string/mul"
style="@style/button_style"
@@ -84,22 +84,22 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit1"
android:text="@string/digit1"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit2"
android:text="@string/digit2"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit3"
android:text="@string/digit3"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/minus"
android:text="@string/minus"
style="@style/button_style"
@@ -111,22 +111,22 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/dot"
android:text="@string/dot"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/digit0"
android:text="@string/digit0"
style="@style/digit_button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/equal"
android:text="@string/equal"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/plus"
android:text="@string/plus"
style="@style/button_style"
View
20 res/layout-sw600dp-land/function_pad.xml
@@ -31,17 +31,17 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/parentheses"
android:text="@string/parentheses"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/mod"
android:text="@string/mod"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/coma"
android:text="@string/coma"
style="@style/button_style"
@@ -53,14 +53,14 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/solveForX"
android:text="@string/solveForX"
android:textSize="26dp"
android:layout_weight="1"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/X"
android:text="@string/X"
android:layout_weight="2"
@@ -73,14 +73,14 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/solveForY"
android:text="@string/solveForY"
android:textSize="26dp"
android:layout_weight="1"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/Y"
android:text="@string/Y"
android:layout_weight="2"
@@ -93,17 +93,17 @@
android:layout_width="match_parent"
android:layout_height="0dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/integral"
android:text="@string/integral"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/dx"
android:text="@string/dx"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/dy"
android:text="@string/dy"
style="@style/button_style"
View
12 res/layout-sw600dp-land/main.xml
@@ -34,7 +34,7 @@
android:layout_marginBottom="@dimen/group_padding"
android:background="@android:color/transparent">
- <com.android.calculator3.CalculatorDisplay
+ <com.android2.calculator3.CalculatorDisplay
android:id="@+id/display"
android:layout_width="0dp"
android:layout_weight="1"
@@ -42,12 +42,12 @@
maxDigits="@integer/max_digits"
>
- <com.android.calculator3.CalculatorEditText
+ <com.android2.calculator3.CalculatorEditText
style="@style/display_style" />
- <com.android.calculator3.CalculatorEditText
+ <com.android2.calculator3.CalculatorEditText
style="@style/display_style" />
- </com.android.calculator3.CalculatorDisplay>
+ </com.android2.calculator3.CalculatorDisplay>
<ImageButton android:id="@+id/overflow_menu"
android:layout_width="48dip"
android:layout_height="match_parent"
@@ -83,14 +83,14 @@
android:layout_weight="4"
android:orientation="horizontal">
- <com.android.calculator3.CalculatorViewPager
+ <com.android2.calculator3.CalculatorViewPager
android:id="@+id/smallPanelswitch"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="2"
/>
- <com.android.calculator3.CalculatorViewPager
+ <com.android2.calculator3.CalculatorViewPager
android:id="@+id/largePanelswitch"
android:layout_width="0dip"
android:layout_height="match_parent"
View
22 res/layout-sw600dp-land/matrix_pad.xml
@@ -1,35 +1,35 @@
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/matrixPad"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_gravity="center"
>
- <fragment class="com.android.calculator3.MatrixFragment"
+ <fragment class="com.android2.calculator3.MatrixFragment"
android:id="@+id/matrixFragment"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
/>
<LinearLayout
android:layout_width="fill_parent"
- android:layout_height="75dp"
- android:layout_alignParentBottom="true"
- android:layout_alignParentRight="true"
+ android:layout_height="fill_parent"
+ android:layout_weight="4"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/eigenvalue"
android:text="@string/eigenvalue"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/determinant"
android:text="@string/determinant"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/solve"
android:text="@string/solve"
style="@style/button_small_style"
/>
</LinearLayout>
-</RelativeLayout>
+</LinearLayout>
View
12 res/layout-sw600dp/main.xml
@@ -34,7 +34,7 @@
android:layout_marginBottom="@dimen/group_padding"
android:background="@android:color/transparent">
- <com.android.calculator3.CalculatorDisplay
+ <com.android2.calculator3.CalculatorDisplay
android:id="@+id/display"
android:layout_width="0dp"
android:layout_weight="1"
@@ -42,12 +42,12 @@
maxDigits="@integer/max_digits"
>
- <com.android.calculator3.CalculatorEditText
+ <com.android2.calculator3.CalculatorEditText
style="@style/display_style" />
- <com.android.calculator3.CalculatorEditText
+ <com.android2.calculator3.CalculatorEditText
style="@style/display_style" />
- </com.android.calculator3.CalculatorDisplay>
+ </com.android2.calculator3.CalculatorDisplay>
<ImageButton android:id="@+id/overflow_menu"
android:layout_width="48dip"
android:layout_height="match_parent"
@@ -77,14 +77,14 @@
</FrameLayout>
</LinearLayout>
- <com.android.calculator3.CalculatorViewPager
+ <com.android2.calculator3.CalculatorViewPager
android:id="@+id/smallPanelswitch"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
/>
- <com.android.calculator3.CalculatorViewPager
+ <com.android2.calculator3.CalculatorViewPager
android:id="@+id/largePanelswitch"
android:layout_width="match_parent"
android:layout_height="0dp"
View
22 res/layout-sw600dp/matrix_pad.xml
@@ -1,35 +1,35 @@
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/matrixPad"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_gravity="center"
>
- <fragment class="com.android.calculator3.MatrixFragment"
+ <fragment class="com.android2.calculator3.MatrixFragment"
android:id="@+id/matrixFragment"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
/>
<LinearLayout
android:layout_width="fill_parent"
- android:layout_height="75dp"
- android:layout_alignParentBottom="true"
- android:layout_alignParentRight="true"
+ android:layout_height="fill_parent"
+ android:layout_weight="4"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/eigenvalue"
android:text="@string/eigenvalue"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/determinant"
android:text="@string/determinant"
style="@style/button_small_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/solve"
android:text="@string/solve"
style="@style/button_small_style"
/>
</LinearLayout>
-</RelativeLayout>
+</LinearLayout>
View
16 res/layout/matrix.xml
@@ -36,17 +36,27 @@
android:id="@+id/matrixButtons"
android:minWidth="15dp"
>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/matrixPlus"
android:text="@string/plus"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
android:id="@+id/matrixMul"
android:text="@string/mul"
style="@style/button_style"
/>
- <com.android.calculator3.ColorButton
+ <com.android2.calculator3.ColorButton
+ android:id="@+id/matrixDot"
+ android:text="@string/dotProduct"
+ style="@style/button_style"
+ />
+ <com.android2.calculator3.ColorButton
+ android:id="@+id/matrixCross"
+ android:text="@string/crossProduct"
+ style="@style/button_style"
+ />
+ <com.android2.calculator3.ColorButton
android:id="@+id/ok"
android:text="@android:string/ok"
style="@style/button_small_style"
View
4 res/values/strings.xml
@@ -109,4 +109,6 @@
<string name="inverse">Inv</string>
<string name="determinant">Det</string>
<string name="eigenvalue">Eigen</string>
- <string name="solve">Solve</string>
+ <string name="solve">Solve</string>
+ <string name="dotProduct">Dot</string>
+ <string name="crossProduct">Cross</string>
View
110 src/com/android/calculator3/CalculatorEditable.java
@@ -1,110 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.calculator3;
-
-import android.text.SpannableStringBuilder;
-import android.text.Editable;
-
-class CalculatorEditable extends SpannableStringBuilder {
- private static final char[] ORIGINALS = {'-', '*', '/'};
- private static final char[] REPLACEMENTS = {'\u2212', '\u00d7', '\u00f7'};
- private boolean isInsideReplace = false;
- private Logic mLogic;
-
- private CalculatorEditable(CharSequence source, Logic logic) {
- super(source);
- mLogic = logic;
- }
-
- @Override
- public SpannableStringBuilder
- replace(int start, int end, CharSequence tb, int tbstart, int tbend) {
- if (isInsideReplace) {
- return super.replace(start, end, tb, tbstart, tbend);
- } else {
- isInsideReplace = true;
- try {
- String delta = tb.subSequence(tbstart, tbend).toString();
- return internalReplace(start, end, delta);
- } finally {
- isInsideReplace = false;
- }
- }
- }
-
- private SpannableStringBuilder internalReplace(int start, int end, String delta) {
- if (!mLogic.acceptInsert(delta)) {
- mLogic.cleared();
- start = 0;
- end = length();
- }
-
- for (int i = ORIGINALS.length - 1; i >= 0; --i) {
- delta = delta.replace(ORIGINALS[i], REPLACEMENTS[i]);
- }
-
- int length = delta.length();
- if (length == 1) {
- char text = delta.charAt(0);
-
- //don't allow two dots in the same number
- if (text == '.') {
- int p = start - 1;
- while (p >= 0 && Character.isDigit(charAt(p))) {
- --p;
- }
- if (p >= 0 && charAt(p) == '.') {
- return super.replace(start, end, "");
- }
- }
-
- char prevChar = start > 0 ? charAt(start-1) : '\0';
-
- //don't allow 2 successive minuses
- if (text == Logic.MINUS && prevChar == Logic.MINUS) {
- return super.replace(start, end, "");
- }
-
- //don't allow multiple successive operators
- if (Logic.isOperator(text)) {
- while (Logic.isOperator(prevChar) &&
- (text != Logic.MINUS || prevChar == '+')) {
- --start;
- prevChar = start > 0 ? charAt(start-1) : '\0';
- }
- }
-
- //don't allow leading operator + * /
- if (start == 0 && Logic.isOperator(text) && text != Logic.MINUS) {
- return super.replace(start, end, "");
- }
- }
- return super.replace(start, end, delta);
- }
-
- public static class Factory extends Editable.Factory {
- private Logic mLogic;
-
- public Factory(Logic logic) {
- mLogic = logic;
- }
-
- public Editable newEditable(CharSequence source) {
- return new CalculatorEditable(source, mLogic);
- }
- }
-}
View
14 src/com/android/calculator3/Calculator.java → src/com/android2/calculator3/Calculator.java
@@ -14,12 +14,9 @@
* limitations under the License.
*/
-package com.android.calculator3;
-
-import java.text.DecimalFormat;
+package com.android2.calculator3;
import org.achartengine.GraphicalView;
-import org.achartengine.model.SeriesSelection;
import android.app.Activity;
import android.content.res.Resources;
@@ -41,7 +38,6 @@
import android.view.WindowManager;
import android.widget.LinearLayout;
import android.widget.PopupMenu;
-import android.widget.Toast;
import android.widget.PopupMenu.OnMenuItemClickListener;
public class Calculator extends Activity implements PanelSwitcher.Listener, Logic.Listener,
@@ -580,14 +576,6 @@ public Object instantiateItem(View container, int position) {
if (mChartView == null) {
mChartView = mGraph.getGraph(Calculator.this);
mChartView.setId(R.id.graphView);
- mChartView.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- SeriesSelection seriesSelection = mChartView.getCurrentSeriesAndPoint();
- DecimalFormat formater = new DecimalFormat("#.#");
- if(seriesSelection != null) Toast.makeText(Calculator.this, "(" + formater.format(seriesSelection.getXValue()) + "," + formater.format(seriesSelection.getValue()) + ")", Toast.LENGTH_SHORT).show();
- }
- });
((LinearLayout) mGraphPage).addView(mChartView, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
}
else {
View
2  src/com/android/calculator3/CalculatorDisplay.java → src/com/android2/calculator3/CalculatorDisplay.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.calculator3;
+package com.android2.calculator3;
import android.content.Context;
import android.graphics.Rect;
View
2  src/com/android/calculator3/CalculatorEditText.java → src/com/android2/calculator3/CalculatorEditText.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.calculator3;
+package com.android2.calculator3;
import android.content.ClipData;
import android.content.ClipboardManager;
View
2  src/com/android/calculator3/CalculatorViewPager.java → ...com/android2/calculator3/CalculatorViewPager.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.calculator3;
+package com.android2.calculator3;
import android.content.Context;
import android.support.v4.view.ViewPager;
View
2  src/com/android/calculator3/ColorButton.java → src/com/android2/calculator3/ColorButton.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.calculator3;
+package com.android2.calculator3;
import android.content.Context;
import android.graphics.Canvas;
View
2  src/com/android/calculator3/EventListener.java → src/com/android2/calculator3/EventListener.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.calculator3;
+package com.android2.calculator3;
import android.content.Context;
import android.support.v4.view.ViewPager;
View
2  src/com/android/calculator3/Graph.java → src/com/android2/calculator3/Graph.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.android.calculator3;
+package com.android2.calculator3;
import org.achartengine.ChartFactory;
import org.achartengine.GraphicalView;
View
2  src/com/android/calculator3/History.java → src/com/android2/calculator3/History.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.calculator3;
+package com.android2.calculator3;
import android.widget.BaseAdapter;
View
2  src/com/android/calculator3/HistoryAdapter.java → src/com/android2/calculator3/HistoryAdapter.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.calculator3;
+package com.android2.calculator3;
import android.view.LayoutInflater;
import android.view.ViewGroup;
View
2  src/com/android/calculator3/HistoryEntry.java → src/com/android2/calculator3/HistoryEntry.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.calculator3;
+package com.android2.calculator3;
import java.io.DataInput;
import java.io.DataOutput;
View
156 src/com/android/calculator3/Logic.java → src/com/android2/calculator3/Logic.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.calculator3;
+package com.android2.calculator3;
import android.os.Handler;
import android.text.TextUtils;
@@ -32,20 +32,24 @@
import java.util.Locale;
+import net.sf.jchemistry.util.CommonMathUtils;
+
import org.achartengine.GraphicalView;
import org.achartengine.model.XYSeries;
import org.achartengine.util.MathHelper;
import org.apache.commons.math3.exception.DimensionMismatchException;
+import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.apache.commons.math3.linear.Array2DRowRealMatrix;
import org.apache.commons.math3.linear.EigenDecomposition;
import org.apache.commons.math3.linear.LUDecomposition;
import org.apache.commons.math3.linear.MatrixDimensionMismatchException;
import org.apache.commons.math3.linear.NonSymmetricMatrixException;
import org.apache.commons.math3.linear.RealMatrix;
+import org.apache.commons.math3.linear.RealVector;
import org.javia.arity.Symbols;
import org.javia.arity.SyntaxException;
-import com.android.calculator3.CalculatorDisplay.Scroll;
+import com.android2.calculator3.CalculatorDisplay.Scroll;
class Logic {
private CalculatorDisplay mDisplay;
@@ -75,8 +79,20 @@
private final String mLogString;
private final String mLnString;
private final String mModString;
+ private final String mTitleString;
private final String mX;
private final String mY;
+ private final String solveForX;
+ private final String solveForY;
+ private final String mPlusString;
+ private final String mMinusString;
+ private final String mDivString;
+ private final String mMulString;
+ private final String mDotString;
+ private final String mComaString;
+ private final String mPowerString;
+ private final String mSqrtString;
+ private final String mIntegralString;
public final static int DELETE_MODE_BACKSPACE = 0;
public final static int DELETE_MODE_CLEAR = 1;
@@ -97,11 +113,23 @@
mCosString = context.getResources().getString(R.string.cos);
mTanString = context.getResources().getString(R.string.tan);
mLogString = context.getResources().getString(R.string.lg);
- mLnString = context.getResources().getString(R.string.error);
+ mLnString = context.getResources().getString(R.string.ln);
mModString = context.getResources().getString(R.string.mod);
- mX = mContext.getResources().getString(R.string.X);
- mY = mContext.getResources().getString(R.string.Y);
-
+ mX = context.getResources().getString(R.string.X);
+ mY = context.getResources().getString(R.string.Y);
+ mTitleString = context.getResources().getString(R.string.graphTitle);
+ solveForX = context.getResources().getString(R.string.solveForX);
+ solveForY = context.getResources().getString(R.string.solveForY);
+ mPlusString = context.getResources().getString(R.string.plus);
+ mMinusString = context.getResources().getString(R.string.minus);
+ mDivString = context.getResources().getString(R.string.div);
+ mMulString = context.getResources().getString(R.string.mul);
+ mDotString = context.getResources().getString(R.string.dot);
+ mComaString = context.getResources().getString(R.string.coma);
+ mPowerString = context.getResources().getString(R.string.power);
+ mSqrtString = context.getResources().getString(R.string.sqrt);