From f577dd77d8a2a707b881c6e23070411e1ea7d992 Mon Sep 17 00:00:00 2001 From: serso Date: Sat, 2 Apr 2016 15:25:54 +0200 Subject: [PATCH] Floating calculator should use the same layout as main --- .../calculator/FloatingCalculatorKeyboard.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/solovyev/android/calculator/FloatingCalculatorKeyboard.java b/app/src/main/java/org/solovyev/android/calculator/FloatingCalculatorKeyboard.java index 6590c9ad..a9033767 100644 --- a/app/src/main/java/org/solovyev/android/calculator/FloatingCalculatorKeyboard.java +++ b/app/src/main/java/org/solovyev/android/calculator/FloatingCalculatorKeyboard.java @@ -74,8 +74,8 @@ public class FloatingCalculatorKeyboard extends BaseFloatingKeyboard { addButton(row, 0, "7"); addButton(row, 0, "8"); addButton(row, 0, "9").setText(up, "π").setText(down, "e"); - addOperationButton(row, R.id.cpp_kb_button_divide, "/").setText(up, "%").setText(down, "sqrt"); - addOperationButton(row, R.id.cpp_kb_button_multiply, "×").setText(up, "^n").setText(down, "^2"); + addOperationButton(row, R.id.cpp_kb_button_divide, "/").setText(up, "√").setText(down, "%"); + addOperationButton(row, R.id.cpp_kb_button_multiply, "×").setText(up, "^").setText(down, "^2"); addButton(row, R.id.cpp_kb_button_clear, "C"); row = makeRow(); @@ -115,14 +115,14 @@ public class FloatingCalculatorKeyboard extends BaseFloatingKeyboard { addButton(row, 0, "7"); addButton(row, 0, "8"); addButton(row, 0, "9").setText(up, "π").setText(down, "e"); - addOperationButton(row, R.id.cpp_kb_button_divide, "/").setText(up, "%").setText(down, "sqrt"); + addOperationButton(row, R.id.cpp_kb_button_divide, "/").setText(up, "√").setText(down, "%"); addButton(row, 0, parametersCount > 0 ? parameterNames.get(0) : "x"); row = makeRow(); addButton(row, 0, "4"); addButton(row, 0, "5"); addButton(row, 0, "6"); - addOperationButton(row, R.id.cpp_kb_button_multiply, "×").setText(up, "^n").setText(down, "^2"); + addOperationButton(row, R.id.cpp_kb_button_multiply, "×").setText(up, "^").setText(down, "^2"); addButton(row, 0, parametersCount > 1 ? parameterNames.get(1) : "y"); row = makeRow(); @@ -229,13 +229,13 @@ public class FloatingCalculatorKeyboard extends BaseFloatingKeyboard { return false; } switch (text) { - case "sqrt": - user.insertText("sqrt()", -1); + case "√": + user.insertText("√()", -1); break; case ",": user.insertText(", ", 0); break; - case "^n": + case "^": user.insertOperator('^'); break; case "^2":