This commit is contained in:
serso
2011-10-09 20:22:44 +04:00
parent a3929945a8
commit 0b591b5e87
23 changed files with 354 additions and 121 deletions

BIN
res/drawable/copy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
res/drawable/heart.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -17,73 +17,68 @@
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp">
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/leftButton"
calc:textUp="↞"
a:text="←"
a:layout_weight="1.5"
style="@style/control_button_style"
a:onClick="moveLeftButtonClickHandler"/>
<include layout="@layout/calc_left_button"
a:layout_width="match_parent"
a:layout_height="match_parent"
a:layout_weight="1.5"/>
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/eraseButton"
a:text="@string/c_erase"
a:layout_weight="1.5"
style="@style/control_button_style"
a:onClick="eraseButtonClickHandler"/>
<include layout="@layout/calc_display"/>
<include layout="@layout/calc_erase_button"
a:layout_width="match_parent"
a:layout_height="match_parent"
a:layout_weight="1.5"/>
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/clearButton"
a:text="@string/c_clear"
a:layout_weight="1.5"
style="@style/control_button_style"
a:onClick="clearButtonClickHandler"/>
<include layout="@layout/calc_display"
a:layout_width="match_parent"
a:layout_height="match_parent"
a:layout_weight="1"/>
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/rightButton"
calc:textUp="↠"
a:text="→"
a:layout_weight="1.5"
style="@style/control_button_style"
a:onClick="moveRightButtonClickHandler"/>
<include layout="@layout/calc_clear_button"
a:layout_width="match_parent"
a:layout_height="match_parent"
a:layout_weight="1.5"/>
<include layout="@layout/calc_right_button"
a:layout_width="match_parent"
a:layout_height="match_parent"
a:layout_weight="1.5"/>
</LinearLayout>
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp">
<include layout="@layout/calc_equals_button"/>
<include layout="@layout/calc_paste_button"/>
<include layout="@layout/calc_one_digit_button"/>
<include layout="@layout/calc_two_digit_button"/>
<include layout="@layout/calc_three_digit_button"/>
<include layout="@layout/calc_multiplication_button"/>
<include layout="@layout/calc_division_button"/>
<include layout="@layout/calc_equals_button"/>
<include layout="@layout/calc_paste_button"/>
</LinearLayout>
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp">
<include layout="@layout/calc_history_button"/>
<include layout="@layout/calc_copy_button"/>
<include layout="@layout/calc_four_digit_button"/>
<include layout="@layout/calc_five_digit_button"/>
<include layout="@layout/calc_six_digit_button"/>
<include layout="@layout/calc_plus_button"/>
<include layout="@layout/calc_subtraction_button"/>
<include layout="@layout/calc_square_brackets_button"/>
<include layout="@layout/calc_history_button"/>
</LinearLayout>
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp">
<include layout="@layout/calc_vars_button"/>
<include layout="@layout/calc_square_brackets_button"/>
<include layout="@layout/calc_seven_digit_button"/>
<include layout="@layout/calc_eight_digit_button"/>
<include layout="@layout/calc_nine_digit_button"/>
<include layout="@layout/calc_zero_digit_button"/>
<include layout="@layout/calc_round_brackets_button"/>
<include layout="@layout/calc_vars_button"/>
<org.solovyev.android.view.widgets.DirectionDragButton a:text="" style="@style/control_button_style"/>
</LinearLayout>

View File

@@ -17,15 +17,15 @@
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp">
<org.solovyev.android.view.widgets.DirectionDragButton
xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/equalsButton"
a:text="="
a:layout_weight="4"
style="@style/control_button_style"
a:onClick="numericButtonClickHandler"/>
<include layout="@layout/calc_equals_button"
a:layout_weight="4"
a:layout_height="match_parent"
a:layout_width="match_parent" />
<include layout="@layout/calc_display"/>
<include layout="@layout/calc_display"
a:layout_width="match_parent"
a:layout_height="match_parent"
a:layout_weight="1"/>
</LinearLayout>
@@ -65,7 +65,7 @@
<include layout="@layout/calc_zero_digit_button"/>
<include layout="@layout/calc_square_brackets_button"/>
<include layout="@layout/calc_subtraction_button"/>
<include layout="@layout/calc_history_button"/>
<include layout="@layout/calc_copy_button"/>
</LinearLayout>
@@ -75,11 +75,8 @@
<include layout="@layout/calc_left_button"/>
<include layout="@layout/calc_right_button"/>
<include layout="@layout/calc_vars_button"/>
<org.solovyev.android.view.widgets.DirectionDragButton a:text="" style="@style/control_button_style"/>
<org.solovyev.android.view.widgets.DirectionDragButton a:text="" style="@style/control_button_style"/>
<include layout="@layout/calc_donate_button"/>
<include layout="@layout/calc_history_button"/>
</LinearLayout>
</LinearLayout>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2009-2011. Created by serso aka se.solovyev.
~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org
-->
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/pasteButton"
a:src="@drawable/copy"
style="@style/control_button_style"
a:padding="6dp"
a:onClick="copyButtonClickHandler"/>

View File

@@ -8,7 +8,7 @@
<org.solovyev.android.calculator.CalculatorDisplay
xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/resultEditText"
a:id="@+id/calculatorDisplay"
style="@style/display_style"
a:layout_weight="1"
a:minLines="1"

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2009-2011. Created by serso aka se.solovyev.
~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org
-->
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/pasteButton"
a:src="@drawable/heart"
style="@style/control_button_style"
a:padding="6dp"
a:onClick="donateButtonClickHandler"/>

View File

@@ -12,7 +12,7 @@
a:layout_height="0dp">
<org.solovyev.android.calculator.CalculatorEditor
a:id="@+id/editText"
a:id="@+id/calculatorEditor"
style="@style/editor_style"
a:inputType="textMultiLine"
a:maxLines="4"

View File

@@ -55,4 +55,5 @@
<string name="c_pi_description">Отношение длины окружности к диаметру</string>
<string name="c_e_description">Вещесвтенное число, такое что производная функции f(x) = e^x в точке x = 0 равно 1</string>
<string name="c_i_description">Мнимая единица, определённая как i^2 = 1</string>
<string name="c_calc_editor_hint">Введите новое выражение</string>
</resources>

View File

@@ -58,5 +58,6 @@
<string name="c_pi_description">Ratio of any circle\'s circumference to its diameter</string>
<string name="c_e_description">Unique real number such that the value of the derivative (slope of the tangent line) of the function f(x) = e^x at the point x = 0 is equal to 1</string>
<string name="c_i_description">Imaginary unit, defined such that i^2 = 1</string>
<string name="c_calc_editor_hint"></string>
<string name="c_calc_editor_hint">Enter new expression</string>
<string name="c_press_to_copy">Press to copy</string>
</resources>