changes
This commit is contained in:
parent
19818c510e
commit
8ce44cd900
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/appButton"
|
a:id="@id/cpp_button_app"
|
||||||
a:src="@drawable/kb_logo"
|
a:src="@drawable/kb_logo"
|
||||||
style="@style/cpp_simple_metro_control_image_button_style"
|
style="@style/cpp_simple_metro_control_image_button_style"
|
||||||
a:contentDescription="App"/>
|
a:contentDescription="App"/>
|
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/clearButton"
|
a:id="@id/cpp_button_clear"
|
||||||
a:text="@string/c_clear"
|
a:text="@string/c_clear"
|
||||||
a:textStyle="bold"
|
a:textStyle="bold"
|
||||||
style="@style/cpp_simple_metro_control_button_style"/>
|
style="@style/cpp_simple_metro_control_button_style"/>
|
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/copyButton"
|
a:id="@id/cpp_button_copy"
|
||||||
a:src="@drawable/kb_copy"
|
a:src="@drawable/kb_copy"
|
||||||
style="@style/cpp_simple_metro_control_image_button_style"
|
style="@style/cpp_simple_metro_control_image_button_style"
|
||||||
a:contentDescription="Copy"/>
|
a:contentDescription="Copy"/>
|
@ -7,6 +7,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/divisionButton"
|
a:id="@id/cpp_button_division"
|
||||||
a:text="/"
|
a:text="/"
|
||||||
style="@style/cpp_simple_metro_blue_operation_button_style"/>
|
style="@style/cpp_simple_metro_blue_operation_button_style"/>
|
@ -7,6 +7,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/periodButton"
|
a:id="@id/cpp_button_period"
|
||||||
a:text="."
|
a:text="."
|
||||||
style="@style/metro_digit_button_style"/>
|
style="@style/metro_digit_button_style"/>
|
@ -7,6 +7,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/eightDigitButton"
|
a:id="@id/cpp_button_8"
|
||||||
a:text="8"
|
a:text="8"
|
||||||
style="@style/cpp_simple_metro_digit_button_style"/>
|
style="@style/cpp_simple_metro_digit_button_style"/>
|
@ -7,6 +7,6 @@
|
|||||||
-->
|
-->
|
||||||
<Button
|
<Button
|
||||||
xmlns:a="http://schemas.android.com/apk/res/android"
|
xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/equalsButton"
|
a:id="@id/cpp_button_equals"
|
||||||
a:text="="
|
a:text="="
|
||||||
style="@style/cpp_simple_metro_control_button_style"/>
|
style="@style/cpp_simple_metro_control_button_style"/>
|
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/eraseButton"
|
a:id="@id/cpp_button_erase"
|
||||||
a:src="@drawable/kb_delete"
|
a:src="@drawable/kb_delete"
|
||||||
style="@style/cpp_simple_metro_control_image_button_style"
|
style="@style/cpp_simple_metro_control_image_button_style"
|
||||||
a:contentDescription="Erase"/>
|
a:contentDescription="Erase"/>
|
@ -6,6 +6,6 @@
|
|||||||
~ or visit http://se.solovyev.org
|
~ or visit http://se.solovyev.org
|
||||||
-->
|
-->
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/fiveDigitButton"
|
a:id="@id/cpp_button_5"
|
||||||
a:text="5"
|
a:text="5"
|
||||||
style="@style/cpp_simple_metro_digit_button_style"/>
|
style="@style/cpp_simple_metro_digit_button_style"/>
|
@ -6,6 +6,6 @@
|
|||||||
~ or visit http://se.solovyev.org
|
~ or visit http://se.solovyev.org
|
||||||
-->
|
-->
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/fourDigitButton"
|
a:id="@id/cpp_button_4"
|
||||||
a:text="4"
|
a:text="4"
|
||||||
style="@style/cpp_simple_metro_digit_button_style"/>
|
style="@style/cpp_simple_metro_digit_button_style"/>
|
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/functions_button"
|
a:id="@id/cpp_button_functions"
|
||||||
a:text="ƒ(x)"
|
a:text="ƒ(x)"
|
||||||
a:textStyle="italic"
|
a:textStyle="italic"
|
||||||
style="@style/cpp_simple_metro_control_button_style"/>
|
style="@style/cpp_simple_metro_control_button_style"/>
|
@ -6,7 +6,7 @@
|
|||||||
~ or visit http://se.solovyev.org
|
~ or visit http://se.solovyev.org
|
||||||
-->
|
-->
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/historyButton"
|
a:id="@id/cpp_button_history"
|
||||||
a:text="@string/c_history_button"
|
a:text="@string/c_history_button"
|
||||||
style="@style/cpp_simple_metro_control_button_style"
|
style="@style/cpp_simple_metro_control_button_style"
|
||||||
a:textStyle="bold"/>
|
a:textStyle="bold"/>
|
@ -7,6 +7,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/leftButton"
|
a:id="@id/cpp_button_left"
|
||||||
a:text="◀"
|
a:text="◀"
|
||||||
style="@style/cpp_simple_metro_control_button_style"/>
|
style="@style/cpp_simple_metro_control_button_style"/>
|
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/likeButton"
|
a:id="@id/cpp_button_like"
|
||||||
a:src="@drawable/kb_facebook"
|
a:src="@drawable/kb_facebook"
|
||||||
style="@style/cpp_simple_metro_control_image_button_style"
|
style="@style/cpp_simple_metro_control_image_button_style"
|
||||||
a:contentDescription="Like"/>
|
a:contentDescription="Like"/>
|
@ -7,6 +7,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/multiplicationButton"
|
a:id="@id/cpp_button_multiplication"
|
||||||
a:text="×"
|
a:text="×"
|
||||||
style="@style/cpp_simple_metro_blue_operation_button_style"/>
|
style="@style/cpp_simple_metro_blue_operation_button_style"/>
|
@ -7,6 +7,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/nineDigitButton"
|
a:id="@id/cpp_button_9"
|
||||||
a:text="9"
|
a:text="9"
|
||||||
style="@style/cpp_simple_metro_digit_button_style"/>
|
style="@style/cpp_simple_metro_digit_button_style"/>
|
@ -7,6 +7,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/oneDigitButton"
|
a:id="@id/cpp_button_1"
|
||||||
a:text="1"
|
a:text="1"
|
||||||
style="@style/cpp_simple_metro_digit_button_style"/>
|
style="@style/cpp_simple_metro_digit_button_style"/>
|
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/pasteButton"
|
a:id="@id/cpp_button_paste"
|
||||||
a:src="@drawable/kb_paste"
|
a:src="@drawable/kb_paste"
|
||||||
style="@style/cpp_simple_metro_control_image_button_style"
|
style="@style/cpp_simple_metro_control_image_button_style"
|
||||||
a:contentDescription="Paste"/>
|
a:contentDescription="Paste"/>
|
@ -7,6 +7,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/percentButton"
|
a:id="@id/cpp_button_percent"
|
||||||
a:text="%"
|
a:text="%"
|
||||||
style="@style/cpp_simple_metro_blue_operation_button_style"/>
|
style="@style/cpp_simple_metro_blue_operation_button_style"/>
|
@ -6,6 +6,6 @@
|
|||||||
~ or visit http://se.solovyev.org
|
~ or visit http://se.solovyev.org
|
||||||
-->
|
-->
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/plusButton"
|
a:id="@id/cpp_button_plus"
|
||||||
a:text="+"
|
a:text="+"
|
||||||
style="@style/cpp_simple_metro_blue_operation_button_style"/>
|
style="@style/cpp_simple_metro_blue_operation_button_style"/>
|
@ -7,6 +7,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/powerButton"
|
a:id="@id/cpp_button_power"
|
||||||
a:text="^"
|
a:text="^"
|
||||||
style="@style/cpp_simple_metro_blue_operation_button_style"/>
|
style="@style/cpp_simple_metro_blue_operation_button_style"/>
|
@ -7,6 +7,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/rightButton"
|
a:id="@id/cpp_button_right"
|
||||||
a:text="▶"
|
a:text="▶"
|
||||||
style="@style/cpp_simple_metro_control_button_style"/>
|
style="@style/cpp_simple_metro_control_button_style"/>
|
@ -7,6 +7,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/roundBracketsButton"
|
a:id="@id/cpp_button_round_brackets"
|
||||||
a:text="()"
|
a:text="()"
|
||||||
style="@style/cpp_simple_metro_digit_button_style"/>
|
style="@style/cpp_simple_metro_digit_button_style"/>
|
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/settingsButton"
|
a:id="@id/cpp_button_settings"
|
||||||
a:src="@drawable/kb_settings"
|
a:src="@drawable/kb_settings"
|
||||||
style="@style/cpp_simple_metro_control_image_button_style"
|
style="@style/cpp_simple_metro_control_image_button_style"
|
||||||
a:contentDescription="Settings"/>
|
a:contentDescription="Settings"/>
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/sevenDigitButton"
|
a:id="@id/cpp_button_7"
|
||||||
a:text="7"
|
a:text="7"
|
||||||
style="@style/cpp_simple_metro_digit_button_style"/>
|
style="@style/cpp_simple_metro_digit_button_style"/>
|
@ -7,6 +7,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/sixDigitButton"
|
a:id="@id/cpp_button_6"
|
||||||
a:text="6"
|
a:text="6"
|
||||||
style="@style/cpp_simple_metro_digit_button_style"/>
|
style="@style/cpp_simple_metro_digit_button_style"/>
|
@ -6,6 +6,6 @@
|
|||||||
~ or visit http://se.solovyev.org
|
~ or visit http://se.solovyev.org
|
||||||
-->
|
-->
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/subtractionButton"
|
a:id="@id/cpp_button_subtraction"
|
||||||
a:text="-"
|
a:text="-"
|
||||||
style="@style/cpp_simple_metro_blue_operation_button_style"/>
|
style="@style/cpp_simple_metro_blue_operation_button_style"/>
|
@ -7,6 +7,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/threeDigitButton"
|
a:id="@id/cpp_button_3"
|
||||||
a:text="3"
|
a:text="3"
|
||||||
style="@style/cpp_simple_metro_digit_button_style"/>
|
style="@style/cpp_simple_metro_digit_button_style"/>
|
@ -7,6 +7,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/twoDigitButton"
|
a:id="@id/cpp_button_2"
|
||||||
a:text="2"
|
a:text="2"
|
||||||
style="@style/cpp_simple_metro_digit_button_style"/>
|
style="@style/cpp_simple_metro_digit_button_style"/>
|
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/vars_button"
|
a:id="@id/cpp_button_vars"
|
||||||
a:text="π,…"
|
a:text="π,…"
|
||||||
a:textStyle="italic"
|
a:textStyle="italic"
|
||||||
style="@style/cpp_simple_metro_control_button_style"/>
|
style="@style/cpp_simple_metro_control_button_style"/>
|
@ -7,6 +7,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/zeroDigitButton"
|
a:id="@id/cpp_button_0"
|
||||||
a:text="0"
|
a:text="0"
|
||||||
style="@style/cpp_simple_metro_digit_button_style"/>
|
style="@style/cpp_simple_metro_digit_button_style"/>
|
@ -1,36 +1,37 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<item type="id" name="oneDigitButton"/>
|
<item type="id" name="cpp_button_1"/>
|
||||||
<item type="id" name="twoDigitButton"/>
|
<item type="id" name="cpp_button_2"/>
|
||||||
<item type="id" name="threeDigitButton"/>
|
<item type="id" name="cpp_button_3"/>
|
||||||
<item type="id" name="fourDigitButton"/>
|
<item type="id" name="cpp_button_4"/>
|
||||||
<item type="id" name="fiveDigitButton"/>
|
<item type="id" name="cpp_button_5"/>
|
||||||
<item type="id" name="sixDigitButton"/>
|
<item type="id" name="cpp_button_6"/>
|
||||||
<item type="id" name="sevenDigitButton"/>
|
<item type="id" name="cpp_button_7"/>
|
||||||
<item type="id" name="eightDigitButton"/>
|
<item type="id" name="cpp_button_8"/>
|
||||||
<item type="id" name="nineDigitButton"/>
|
<item type="id" name="cpp_button_9"/>
|
||||||
<item type="id" name="zeroDigitButton"/>
|
<item type="id" name="cpp_button_0"/>
|
||||||
|
|
||||||
<item type="id" name="periodButton"/>
|
<item type="id" name="cpp_button_period"/>
|
||||||
<item type="id" name="roundBracketsButton"/>
|
<item type="id" name="cpp_button_round_brackets"/>
|
||||||
<item type="id" name="settingsButton"/>
|
<item type="id" name="cpp_button_settings"/>
|
||||||
<item type="id" name="likeButton"/>
|
<item type="id" name="cpp_button_like"/>
|
||||||
<item type="id" name="leftButton"/>
|
<item type="id" name="cpp_button_left"/>
|
||||||
<item type="id" name="rightButton"/>
|
<item type="id" name="cpp_button_right"/>
|
||||||
<item type="id" name="vars_button"/>
|
<item type="id" name="cpp_button_vars"/>
|
||||||
<item type="id" name="functions_button"/>
|
<item type="id" name="cpp_button_functions"/>
|
||||||
<item type="id" name="appButton"/>
|
<item type="id" name="cpp_button_operators"/>
|
||||||
<item type="id" name="historyButton"/>
|
<item type="id" name="cpp_button_app"/>
|
||||||
<item type="id" name="multiplicationButton"/>
|
<item type="id" name="cpp_button_history"/>
|
||||||
<item type="id" name="divisionButton"/>
|
<item type="id" name="cpp_button_multiplication"/>
|
||||||
<item type="id" name="plusButton"/>
|
<item type="id" name="cpp_button_division"/>
|
||||||
<item type="id" name="subtractionButton"/>
|
<item type="id" name="cpp_button_plus"/>
|
||||||
<item type="id" name="percentButton"/>
|
<item type="id" name="cpp_button_subtraction"/>
|
||||||
<item type="id" name="powerButton"/>
|
<item type="id" name="cpp_button_percent"/>
|
||||||
<item type="id" name="clearButton"/>
|
<item type="id" name="cpp_button_power"/>
|
||||||
<item type="id" name="eraseButton"/>
|
<item type="id" name="cpp_button_clear"/>
|
||||||
<item type="id" name="copyButton"/>
|
<item type="id" name="cpp_button_erase"/>
|
||||||
<item type="id" name="pasteButton"/>
|
<item type="id" name="cpp_button_copy"/>
|
||||||
<item type="id" name="equalsButton"/>
|
<item type="id" name="cpp_button_paste"/>
|
||||||
|
<item type="id" name="cpp_button_equals"/>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
@ -16,47 +16,47 @@ import java.util.Map;
|
|||||||
public enum CalculatorButton {
|
public enum CalculatorButton {
|
||||||
|
|
||||||
/*digits*/
|
/*digits*/
|
||||||
one(R.id.oneDigitButton, "1"),
|
one(R.id.cpp_button_1, "1"),
|
||||||
two(R.id.twoDigitButton, "2"),
|
two(R.id.cpp_button_2, "2"),
|
||||||
three(R.id.threeDigitButton, "3"),
|
three(R.id.cpp_button_3, "3"),
|
||||||
four(R.id.fourDigitButton, "4"),
|
four(R.id.cpp_button_4, "4"),
|
||||||
five(R.id.fiveDigitButton, "5"),
|
five(R.id.cpp_button_5, "5"),
|
||||||
six(R.id.sixDigitButton, "6"),
|
six(R.id.cpp_button_6, "6"),
|
||||||
seven(R.id.sevenDigitButton, "7"),
|
seven(R.id.cpp_button_7, "7"),
|
||||||
eight(R.id.eightDigitButton, "8"),
|
eight(R.id.cpp_button_8, "8"),
|
||||||
nine(R.id.nineDigitButton, "9"),
|
nine(R.id.cpp_button_9, "9"),
|
||||||
zero(R.id.zeroDigitButton, "0"),
|
zero(R.id.cpp_button_0, "0"),
|
||||||
|
|
||||||
period(R.id.periodButton, "."),
|
period(R.id.cpp_button_period, "."),
|
||||||
brackets(R.id.roundBracketsButton, "()"),
|
brackets(R.id.cpp_button_round_brackets, "()"),
|
||||||
|
|
||||||
settings(R.id.settingsButton, CalculatorSpecialButton.settings_detached),
|
settings(R.id.cpp_button_settings, CalculatorSpecialButton.settings_detached),
|
||||||
like(R.id.likeButton, CalculatorSpecialButton.like),
|
like(R.id.cpp_button_like, CalculatorSpecialButton.like),
|
||||||
|
|
||||||
/*last row*/
|
/*last row*/
|
||||||
left(R.id.leftButton, CalculatorSpecialButton.cursor_left),
|
left(R.id.cpp_button_left, CalculatorSpecialButton.cursor_left),
|
||||||
right(R.id.rightButton, CalculatorSpecialButton.cursor_right),
|
right(R.id.cpp_button_right, CalculatorSpecialButton.cursor_right),
|
||||||
vars(R.id.vars_button, CalculatorSpecialButton.vars_detached),
|
vars(R.id.cpp_button_vars, CalculatorSpecialButton.vars_detached),
|
||||||
functions(R.id.functions_button, CalculatorSpecialButton.functions_detached),
|
functions(R.id.cpp_button_functions, CalculatorSpecialButton.functions_detached),
|
||||||
app(R.id.appButton, CalculatorSpecialButton.open_app),
|
app(R.id.cpp_button_app, CalculatorSpecialButton.open_app),
|
||||||
history(R.id.historyButton, CalculatorSpecialButton.history_detached),
|
history(R.id.cpp_button_history, CalculatorSpecialButton.history_detached),
|
||||||
|
|
||||||
/*operations*/
|
/*operations*/
|
||||||
multiplication(R.id.multiplicationButton, "*"),
|
multiplication(R.id.cpp_button_multiplication, "*"),
|
||||||
division(R.id.divisionButton, "/"),
|
division(R.id.cpp_button_division, "/"),
|
||||||
plus(R.id.plusButton, "+"),
|
plus(R.id.cpp_button_plus, "+"),
|
||||||
subtraction(R.id.subtractionButton, "-"),
|
subtraction(R.id.cpp_button_subtraction, "-"),
|
||||||
percent(R.id.percentButton, "%"),
|
percent(R.id.cpp_button_percent, "%"),
|
||||||
power(R.id.powerButton, "^"),
|
power(R.id.cpp_button_power, "^"),
|
||||||
|
|
||||||
/*last column*/
|
/*last column*/
|
||||||
clear(R.id.clearButton, CalculatorSpecialButton.clear),
|
clear(R.id.cpp_button_clear, CalculatorSpecialButton.clear),
|
||||||
erase(R.id.eraseButton, CalculatorSpecialButton.erase, CalculatorSpecialButton.clear),
|
erase(R.id.cpp_button_erase, CalculatorSpecialButton.erase, CalculatorSpecialButton.clear),
|
||||||
copy(R.id.copyButton, CalculatorSpecialButton.copy),
|
copy(R.id.cpp_button_copy, CalculatorSpecialButton.copy),
|
||||||
paste(R.id.pasteButton, CalculatorSpecialButton.paste),
|
paste(R.id.cpp_button_paste, CalculatorSpecialButton.paste),
|
||||||
|
|
||||||
/*equals*/
|
/*equals*/
|
||||||
equals(R.id.equalsButton, CalculatorSpecialButton.equals);
|
equals(R.id.cpp_button_equals, CalculatorSpecialButton.equals);
|
||||||
|
|
||||||
|
|
||||||
private final int buttonId;
|
private final int buttonId;
|
||||||
|
@ -53,14 +53,14 @@ public final class CalculatorButtons {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void initMultiplicationButton(@NotNull View root) {
|
static void initMultiplicationButton(@NotNull View root) {
|
||||||
final View multiplicationButton = root.findViewById(R.id.multiplicationButton);
|
final View multiplicationButton = root.findViewById(R.id.cpp_button_multiplication);
|
||||||
if ( multiplicationButton instanceof Button) {
|
if ( multiplicationButton instanceof Button) {
|
||||||
((Button) multiplicationButton).setText(Locator.getInstance().getEngine().getMultiplicationSign());
|
((Button) multiplicationButton).setText(Locator.getInstance().getEngine().getMultiplicationSign());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void initMultiplicationButton(@NotNull RemoteViews views) {
|
public static void initMultiplicationButton(@NotNull RemoteViews views) {
|
||||||
views.setTextViewText(R.id.multiplicationButton, Locator.getInstance().getEngine().getMultiplicationSign());
|
views.setTextViewText(R.id.cpp_button_multiplication, Locator.getInstance().getEngine().getMultiplicationSign());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ public final class CalculatorButtons {
|
|||||||
if (AndroidUtils.getScreenOrientation(activity) == Configuration.ORIENTATION_PORTRAIT
|
if (AndroidUtils.getScreenOrientation(activity) == Configuration.ORIENTATION_PORTRAIT
|
||||||
|| !CalculatorPreferences.Gui.autoOrientation.getPreference(preferences)) {
|
|| !CalculatorPreferences.Gui.autoOrientation.getPreference(preferences)) {
|
||||||
|
|
||||||
final DragButton equalsButton = (DragButton)activity.findViewById(R.id.equalsButton);
|
final DragButton equalsButton = (DragButton)activity.findViewById(R.id.cpp_button_equals);
|
||||||
if (equalsButton != null) {
|
if (equalsButton != null) {
|
||||||
if (CalculatorPreferences.Gui.showEqualsButton.getPreference(preferences)) {
|
if (CalculatorPreferences.Gui.showEqualsButton.getPreference(preferences)) {
|
||||||
equalsButton.setVisibility(View.VISIBLE);
|
equalsButton.setVisibility(View.VISIBLE);
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<org.solovyev.android.calculator.view.NumeralBasesButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.calculator.view.NumeralBasesButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/clearButton"
|
a:id="@id/cpp_button_clear"
|
||||||
c:textUp="dec"
|
c:textUp="dec"
|
||||||
a:text="@string/c_clear"
|
a:text="@string/c_clear"
|
||||||
c:textDown="bin"
|
c:textDown="bin"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/copyButton"
|
a:id="@id/cpp_button_copy"
|
||||||
a:src="@drawable/kb_copy"
|
a:src="@drawable/kb_copy"
|
||||||
style="?cpp_control_image_button_style"
|
style="?cpp_control_image_button_style"
|
||||||
a:onClick="copyButtonClickHandler"/>
|
a:onClick="copyButtonClickHandler"/>
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/divisionButton"
|
a:id="@id/cpp_button_division"
|
||||||
c:textUp="%"
|
c:textUp="%"
|
||||||
a:text="/"
|
a:text="/"
|
||||||
c:textDown="√"
|
c:textDown="√"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/likeButton"
|
a:id="@id/cpp_button_like"
|
||||||
a:src="@drawable/kb_facebook"
|
a:src="@drawable/kb_facebook"
|
||||||
style="?cpp_control_image_button_style"
|
style="?cpp_control_image_button_style"
|
||||||
a:onClick="likeButtonClickHandler"/>
|
a:onClick="likeButtonClickHandler"/>
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/periodButton"
|
a:id="@id/cpp_button_period"
|
||||||
a:text="."
|
a:text="."
|
||||||
c:textUp=","
|
c:textUp=","
|
||||||
c:directionTextScale="0.5"
|
c:directionTextScale="0.5"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/eightDigitButton" a:text="8"
|
a:id="@id/cpp_button_8" a:text="8"
|
||||||
c:textUp="ln"
|
c:textUp="ln"
|
||||||
c:textLeft="0d:"
|
c:textLeft="0d:"
|
||||||
c:textDown="lg"
|
c:textDown="lg"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<org.solovyev.android.view.drag.DirectionDragButton
|
<org.solovyev.android.view.drag.DirectionDragButton
|
||||||
xmlns:a="http://schemas.android.com/apk/res/android"
|
xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/equalsButton"
|
a:id="@id/cpp_button_equals"
|
||||||
c:textUp="≡"
|
c:textUp="≡"
|
||||||
a:text="="
|
a:text="="
|
||||||
c:directionTextScale="0.5"
|
c:directionTextScale="0.5"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/eraseButton"
|
a:id="@id/cpp_button_erase"
|
||||||
a:src="@drawable/kb_delete"
|
a:src="@drawable/kb_delete"
|
||||||
style="?cpp_control_image_button_style"
|
style="?cpp_control_image_button_style"
|
||||||
a:onClick="eraseButtonClickHandler"/>
|
a:onClick="eraseButtonClickHandler"/>
|
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/fiveDigitButton"
|
a:id="@id/cpp_button_5"
|
||||||
a:text="5"
|
a:text="5"
|
||||||
c:textUp="t"
|
c:textUp="t"
|
||||||
c:textLeft="E"
|
c:textLeft="E"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/fourDigitButton"
|
a:id="@id/cpp_button_4"
|
||||||
a:text="4"
|
a:text="4"
|
||||||
c:textUp="x"
|
c:textUp="x"
|
||||||
c:textLeft="D"
|
c:textLeft="D"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/functions_button"
|
a:id="@id/cpp_button_functions"
|
||||||
c:directionTextScale="0.5"
|
c:directionTextScale="0.5"
|
||||||
c:textUp="+ƒ"
|
c:textUp="+ƒ"
|
||||||
a:text="ƒ(x)"
|
a:text="ƒ(x)"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/historyButton"
|
a:id="@id/cpp_button_history"
|
||||||
a:text="@string/c_history_button"
|
a:text="@string/c_history_button"
|
||||||
c:textUp="@string/c_undo"
|
c:textUp="@string/c_undo"
|
||||||
c:textDown="@string/c_redo"
|
c:textDown="@string/c_redo"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/leftButton"
|
a:id="@id/cpp_button_left"
|
||||||
c:textUp="◀◀"
|
c:textUp="◀◀"
|
||||||
a:text="◀"
|
a:text="◀"
|
||||||
c:directionTextScale="0.5"
|
c:directionTextScale="0.5"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/multiplicationButton"
|
a:id="@id/cpp_button_multiplication"
|
||||||
a:text="×"
|
a:text="×"
|
||||||
c:textUp="^"
|
c:textUp="^"
|
||||||
c:textDown="^2"
|
c:textDown="^2"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/nineDigitButton" a:text="9"
|
a:id="@id/cpp_button_9" a:text="9"
|
||||||
c:textDown="e"
|
c:textDown="e"
|
||||||
c:textLeft="0x:"
|
c:textLeft="0x:"
|
||||||
c:textUp="π"
|
c:textUp="π"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/oneDigitButton"
|
a:id="@id/cpp_button_1"
|
||||||
a:text="1"
|
a:text="1"
|
||||||
c:textUp="sin"
|
c:textUp="sin"
|
||||||
c:textLeft="A"
|
c:textLeft="A"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/functions_button"
|
a:id="@id/cpp_button_operators"
|
||||||
a:text="∂,…"
|
a:text="∂,…"
|
||||||
a:onClick="operatorsButtonClickHandler"
|
a:onClick="operatorsButtonClickHandler"
|
||||||
style="?cpp_control_button_style"/>
|
style="?cpp_control_button_style"/>
|
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@+id/pasteButton"
|
a:id="@id/cpp_button_paste"
|
||||||
a:src="@drawable/kb_paste"
|
a:src="@drawable/kb_paste"
|
||||||
style="?cpp_control_image_button_style"
|
style="?cpp_control_image_button_style"
|
||||||
a:onClick="pasteButtonClickHandler"/>
|
a:onClick="pasteButtonClickHandler"/>
|
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/plusButton"
|
a:id="@id/cpp_button_plus"
|
||||||
c:directionTextScale="0.5"
|
c:directionTextScale="0.5"
|
||||||
c:textUp="°"
|
c:textUp="°"
|
||||||
c:textDown="E"
|
c:textDown="E"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/rightButton"
|
a:id="@id/cpp_button_right"
|
||||||
c:textUp="▶▶"
|
c:textUp="▶▶"
|
||||||
a:text="▶"
|
a:text="▶"
|
||||||
c:directionTextScale="0.5"
|
c:directionTextScale="0.5"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/roundBracketsButton"
|
a:id="@id/cpp_button_round_brackets"
|
||||||
c:textUp="("
|
c:textUp="("
|
||||||
a:text="()"
|
a:text="()"
|
||||||
c:textDown=")"
|
c:textDown=")"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/sevenDigitButton" a:text="7"
|
a:id="@id/cpp_button_7" a:text="7"
|
||||||
c:textUp="i"
|
c:textUp="i"
|
||||||
c:textLeft="0b:"
|
c:textLeft="0b:"
|
||||||
c:textDown="!"
|
c:textDown="!"
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<org.solovyev.android.calculator.view.AngleUnitsButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.calculator.view.AngleUnitsButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
c:textUp="deg"
|
c:textUp="deg"
|
||||||
a:id="@+id/sixDigitButton"
|
a:id="@id/cpp_button_6"
|
||||||
a:text="6"
|
a:text="6"
|
||||||
c:textLeft="F"
|
c:textLeft="F"
|
||||||
c:textDown="rad"
|
c:textDown="rad"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/subtractionButton"
|
a:id="@id/cpp_button_subtraction"
|
||||||
c:textDown="∂,…"
|
c:textDown="∂,…"
|
||||||
a:text="-"
|
a:text="-"
|
||||||
c:directionTextScale="0.5"
|
c:directionTextScale="0.5"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/threeDigitButton"
|
a:id="@id/cpp_button_3"
|
||||||
a:text="3"
|
a:text="3"
|
||||||
c:textUp="tan"
|
c:textUp="tan"
|
||||||
c:textLeft="C"
|
c:textLeft="C"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/twoDigitButton"
|
a:id="@id/cpp_button_2"
|
||||||
a:text="2"
|
a:text="2"
|
||||||
c:textUp="cos"
|
c:textUp="cos"
|
||||||
c:textLeft="B"
|
c:textLeft="B"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/vars_button"
|
a:id="@id/cpp_button_vars"
|
||||||
c:directionTextScale="0.5"
|
c:directionTextScale="0.5"
|
||||||
c:textUp="+π"
|
c:textUp="+π"
|
||||||
a:text="π,…"
|
a:text="π,…"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@+id/zeroDigitButton"
|
a:id="@id/cpp_button_0"
|
||||||
c:textUp="00"
|
c:textUp="00"
|
||||||
a:text="0"
|
a:text="0"
|
||||||
c:textDown="000"
|
c:textDown="000"
|
||||||
|
@ -87,12 +87,12 @@ public abstract class AbstractCalculatorHelper implements SharedPreferences.OnSh
|
|||||||
setOnDragListeners(root, dragPreferences, preferences);
|
setOnDragListeners(root, dragPreferences, preferences);
|
||||||
|
|
||||||
final OnDragListener historyOnDragListener = new OnDragListenerVibrator(newOnDragListener(new HistoryDragProcessor<CalculatorHistoryState>(getCalculator()), dragPreferences), vibrator, preferences);
|
final OnDragListener historyOnDragListener = new OnDragListenerVibrator(newOnDragListener(new HistoryDragProcessor<CalculatorHistoryState>(getCalculator()), dragPreferences), vibrator, preferences);
|
||||||
final DragButton historyButton = getButton(root, R.id.historyButton);
|
final DragButton historyButton = getButton(root, R.id.cpp_button_history);
|
||||||
if (historyButton != null) {
|
if (historyButton != null) {
|
||||||
historyButton.setOnDragListener(historyOnDragListener);
|
historyButton.setOnDragListener(historyOnDragListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
final DragButton subtractionButton = getButton(root, R.id.subtractionButton);
|
final DragButton subtractionButton = getButton(root, R.id.cpp_button_subtraction);
|
||||||
if (subtractionButton != null) {
|
if (subtractionButton != null) {
|
||||||
subtractionButton.setOnDragListener(new OnDragListenerVibrator(newOnDragListener(new SimpleOnDragListener.DragProcessor() {
|
subtractionButton.setOnDragListener(new OnDragListenerVibrator(newOnDragListener(new SimpleOnDragListener.DragProcessor() {
|
||||||
@Override
|
@Override
|
||||||
@ -108,64 +108,64 @@ public abstract class AbstractCalculatorHelper implements SharedPreferences.OnSh
|
|||||||
|
|
||||||
final OnDragListener toPositionOnDragListener = new OnDragListenerVibrator(new SimpleOnDragListener(new CursorDragProcessor(), dragPreferences), vibrator, preferences);
|
final OnDragListener toPositionOnDragListener = new OnDragListenerVibrator(new SimpleOnDragListener(new CursorDragProcessor(), dragPreferences), vibrator, preferences);
|
||||||
|
|
||||||
final DragButton rightButton = getButton(root, R.id.rightButton);
|
final DragButton rightButton = getButton(root, R.id.cpp_button_right);
|
||||||
if (rightButton != null) {
|
if (rightButton != null) {
|
||||||
rightButton.setOnDragListener(toPositionOnDragListener);
|
rightButton.setOnDragListener(toPositionOnDragListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
final DragButton leftButton = getButton(root, R.id.leftButton);
|
final DragButton leftButton = getButton(root, R.id.cpp_button_left);
|
||||||
if (leftButton != null) {
|
if (leftButton != null) {
|
||||||
leftButton.setOnDragListener(toPositionOnDragListener);
|
leftButton.setOnDragListener(toPositionOnDragListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
final DragButton equalsButton = getButton(root, R.id.equalsButton);
|
final DragButton equalsButton = getButton(root, R.id.cpp_button_equals);
|
||||||
if (equalsButton != null) {
|
if (equalsButton != null) {
|
||||||
equalsButton.setOnDragListener(new OnDragListenerVibrator(newOnDragListener(new EvalDragProcessor(), dragPreferences), vibrator, preferences));
|
equalsButton.setOnDragListener(new OnDragListenerVibrator(newOnDragListener(new EvalDragProcessor(), dragPreferences), vibrator, preferences));
|
||||||
}
|
}
|
||||||
|
|
||||||
final AngleUnitsButton angleUnitsButton = (AngleUnitsButton) getButton(root, R.id.sixDigitButton);
|
final AngleUnitsButton angleUnitsButton = (AngleUnitsButton) getButton(root, R.id.cpp_button_6);
|
||||||
if (angleUnitsButton != null) {
|
if (angleUnitsButton != null) {
|
||||||
angleUnitsButton.setOnDragListener(new OnDragListenerVibrator(newOnDragListener(new CalculatorButtons.AngleUnitsChanger(activity), dragPreferences), vibrator, preferences));
|
angleUnitsButton.setOnDragListener(new OnDragListenerVibrator(newOnDragListener(new CalculatorButtons.AngleUnitsChanger(activity), dragPreferences), vibrator, preferences));
|
||||||
}
|
}
|
||||||
|
|
||||||
final NumeralBasesButton clearButton = (NumeralBasesButton) getButton(root, R.id.clearButton);
|
final NumeralBasesButton clearButton = (NumeralBasesButton) getButton(root, R.id.cpp_button_clear);
|
||||||
if (clearButton != null) {
|
if (clearButton != null) {
|
||||||
clearButton.setOnDragListener(new OnDragListenerVibrator(newOnDragListener(new CalculatorButtons.NumeralBasesChanger(activity), dragPreferences), vibrator, preferences));
|
clearButton.setOnDragListener(new OnDragListenerVibrator(newOnDragListener(new CalculatorButtons.NumeralBasesChanger(activity), dragPreferences), vibrator, preferences));
|
||||||
}
|
}
|
||||||
|
|
||||||
final DragButton varsButton = getButton(root, R.id.vars_button);
|
final DragButton varsButton = getButton(root, R.id.cpp_button_vars);
|
||||||
if (varsButton != null) {
|
if (varsButton != null) {
|
||||||
varsButton.setOnDragListener(new OnDragListenerVibrator(newOnDragListener(new CalculatorButtons.VarsDragProcessor(activity), dragPreferences), vibrator, preferences));
|
varsButton.setOnDragListener(new OnDragListenerVibrator(newOnDragListener(new CalculatorButtons.VarsDragProcessor(activity), dragPreferences), vibrator, preferences));
|
||||||
}
|
}
|
||||||
|
|
||||||
final DragButton functionsButton = getButton(root, R.id.functions_button);
|
final DragButton functionsButton = getButton(root, R.id.cpp_button_functions);
|
||||||
if (functionsButton != null) {
|
if (functionsButton != null) {
|
||||||
functionsButton.setOnDragListener(new OnDragListenerVibrator(newOnDragListener(new CalculatorButtons.FunctionsDragProcessor(activity), dragPreferences), vibrator, preferences));
|
functionsButton.setOnDragListener(new OnDragListenerVibrator(newOnDragListener(new CalculatorButtons.FunctionsDragProcessor(activity), dragPreferences), vibrator, preferences));
|
||||||
}
|
}
|
||||||
|
|
||||||
final DragButton roundBracketsButton = getButton(root, R.id.roundBracketsButton);
|
final DragButton roundBracketsButton = getButton(root, R.id.cpp_button_round_brackets);
|
||||||
if (roundBracketsButton != null) {
|
if (roundBracketsButton != null) {
|
||||||
roundBracketsButton.setOnDragListener(new OnDragListenerVibrator(newOnDragListener(new CalculatorButtons.RoundBracketsDragProcessor(), dragPreferences), vibrator, preferences));
|
roundBracketsButton.setOnDragListener(new OnDragListenerVibrator(newOnDragListener(new CalculatorButtons.RoundBracketsDragProcessor(), dragPreferences), vibrator, preferences));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (layout == CalculatorPreferences.Gui.Layout.simple) {
|
if (layout == CalculatorPreferences.Gui.Layout.simple) {
|
||||||
toggleButtonDirectionText(root, R.id.oneDigitButton, false, DragDirection.up, DragDirection.down);
|
toggleButtonDirectionText(root, R.id.cpp_button_1, false, DragDirection.up, DragDirection.down);
|
||||||
toggleButtonDirectionText(root, R.id.twoDigitButton, false, DragDirection.up, DragDirection.down);
|
toggleButtonDirectionText(root, R.id.cpp_button_2, false, DragDirection.up, DragDirection.down);
|
||||||
toggleButtonDirectionText(root, R.id.threeDigitButton, false, DragDirection.up, DragDirection.down);
|
toggleButtonDirectionText(root, R.id.cpp_button_3, false, DragDirection.up, DragDirection.down);
|
||||||
|
|
||||||
toggleButtonDirectionText(root, R.id.sixDigitButton, false, DragDirection.up, DragDirection.down);
|
toggleButtonDirectionText(root, R.id.cpp_button_6, false, DragDirection.up, DragDirection.down);
|
||||||
toggleButtonDirectionText(root, R.id.sevenDigitButton, false, DragDirection.left, DragDirection.up, DragDirection.down);
|
toggleButtonDirectionText(root, R.id.cpp_button_7, false, DragDirection.left, DragDirection.up, DragDirection.down);
|
||||||
toggleButtonDirectionText(root, R.id.eightDigitButton, false, DragDirection.left, DragDirection.up, DragDirection.down);
|
toggleButtonDirectionText(root, R.id.cpp_button_8, false, DragDirection.left, DragDirection.up, DragDirection.down);
|
||||||
|
|
||||||
toggleButtonDirectionText(root, R.id.clearButton, false, DragDirection.left, DragDirection.up, DragDirection.down);
|
toggleButtonDirectionText(root, R.id.cpp_button_clear, false, DragDirection.left, DragDirection.up, DragDirection.down);
|
||||||
|
|
||||||
toggleButtonDirectionText(root, R.id.fourDigitButton, false, DragDirection.down);
|
toggleButtonDirectionText(root, R.id.cpp_button_4, false, DragDirection.down);
|
||||||
toggleButtonDirectionText(root, R.id.fiveDigitButton, false, DragDirection.down);
|
toggleButtonDirectionText(root, R.id.cpp_button_5, false, DragDirection.down);
|
||||||
|
|
||||||
toggleButtonDirectionText(root, R.id.nineDigitButton, false, DragDirection.left);
|
toggleButtonDirectionText(root, R.id.cpp_button_9, false, DragDirection.left);
|
||||||
|
|
||||||
toggleButtonDirectionText(root, R.id.multiplicationButton, false, DragDirection.left);
|
toggleButtonDirectionText(root, R.id.cpp_button_multiplication, false, DragDirection.left);
|
||||||
toggleButtonDirectionText(root, R.id.plusButton, false, DragDirection.down, DragDirection.up);
|
toggleButtonDirectionText(root, R.id.cpp_button_plus, false, DragDirection.down, DragDirection.up);
|
||||||
}
|
}
|
||||||
|
|
||||||
CalculatorButtons.processButtons(theme, layout, root);
|
CalculatorButtons.processButtons(theme, layout, root);
|
||||||
|
@ -22,7 +22,7 @@ public enum AndroidNumeralBase {
|
|||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public List<Integer> getButtonIds() {
|
public List<Integer> getButtonIds() {
|
||||||
return Arrays.asList(R.id.zeroDigitButton, R.id.oneDigitButton);
|
return Arrays.asList(R.id.cpp_button_0, R.id.cpp_button_1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ public enum AndroidNumeralBase {
|
|||||||
@Override
|
@Override
|
||||||
public List<Integer> getButtonIds() {
|
public List<Integer> getButtonIds() {
|
||||||
final List<Integer> result = new ArrayList<Integer>(bin.getButtonIds());
|
final List<Integer> result = new ArrayList<Integer>(bin.getButtonIds());
|
||||||
result.addAll(Arrays.asList(R.id.twoDigitButton, R.id.threeDigitButton, R.id.fourDigitButton, R.id.fiveDigitButton, R.id.sixDigitButton, R.id.sevenDigitButton));
|
result.addAll(Arrays.asList(R.id.cpp_button_2, R.id.cpp_button_3, R.id.cpp_button_4, R.id.cpp_button_5, R.id.cpp_button_6, R.id.cpp_button_7));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -41,7 +41,7 @@ public enum AndroidNumeralBase {
|
|||||||
@Override
|
@Override
|
||||||
public List<Integer> getButtonIds() {
|
public List<Integer> getButtonIds() {
|
||||||
final List<Integer> result = new ArrayList<Integer>(oct.getButtonIds());
|
final List<Integer> result = new ArrayList<Integer>(oct.getButtonIds());
|
||||||
result.addAll(Arrays.asList(R.id.eightDigitButton, R.id.nineDigitButton));
|
result.addAll(Arrays.asList(R.id.cpp_button_8, R.id.cpp_button_9));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -49,7 +49,7 @@ public enum AndroidNumeralBase {
|
|||||||
hex(CalculatorNumeralBase.hex) {
|
hex(CalculatorNumeralBase.hex) {
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private List<Integer> specialHexButtonIds = Arrays.asList(R.id.oneDigitButton, R.id.twoDigitButton, R.id.threeDigitButton, R.id.fourDigitButton, R.id.fiveDigitButton, R.id.sixDigitButton);
|
private List<Integer> specialHexButtonIds = Arrays.asList(R.id.cpp_button_1, R.id.cpp_button_2, R.id.cpp_button_3, R.id.cpp_button_4, R.id.cpp_button_5, R.id.cpp_button_6);
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user