symbolic calculations added

This commit is contained in:
serso
2011-10-24 23:11:50 +04:00
parent bb2c4af4ec
commit 497077d28d
16 changed files with 270 additions and 123 deletions

View File

@@ -25,9 +25,9 @@
calc:directionTextScale="0.5"
style="?controlButtonStyle"
a:onClick="moveLeftButtonClickHandler"
a:layout_width="fill_parent"
a:layout_width="0dp"
a:layout_height="fill_parent"
a:layout_weight="1.5"/>
a:layout_weight="1"/>
<org.solovyev.android.view.widgets.ColorButton xmlns:a="http://schemas.android.com/apk/res/android"
@@ -36,15 +36,15 @@
a:drawableTop="@drawable/sym_keyboard_delete"
style="?controlImageButtonStyle"
a:onClick="eraseButtonClickHandler"
a:layout_width="fill_parent"
a:layout_width="0dp"
a:layout_height="fill_parent"
a:layout_weight="1.5"/>
a:layout_weight="1"/>
<include layout="@layout/calc_display"
a:layout_width="fill_parent"
a:layout_width="0dp"
a:layout_height="fill_parent"
a:layout_weight="1"/>
a:layout_weight="4"/>
<org.solovyev.android.view.widgets.ColorButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
@@ -53,9 +53,9 @@
a:textStyle="bold"
style="?controlImageButtonStyle"
a:onClick="clearButtonClickHandler"
a:layout_width="fill_parent"
a:layout_width="0dp"
a:layout_height="fill_parent"
a:layout_weight="1.5"/>
a:layout_weight="1"/>
<org.solovyev.android.view.widgets.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
@@ -65,9 +65,9 @@
calc:directionTextScale="0.5"
style="?controlButtonStyle"
a:onClick="moveRightButtonClickHandler"
a:layout_width="fill_parent"
a:layout_width="0dp"
a:layout_height="fill_parent"
a:layout_weight="1.5"/>
a:layout_weight="1"/>
</LinearLayout>
@@ -80,6 +80,7 @@
<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"/>
</LinearLayout>
@@ -92,19 +93,20 @@
<include layout="@layout/calc_six_digit_button"/>
<include layout="@layout/calc_plus_button"/>
<include layout="@layout/calc_subtraction_button"/>
<include layout="@layout/calc_empty_button"/>
</LinearLayout>
<LinearLayout a:layout_weight="1" a:layout_width="fill_parent" a:layout_height="0dp">
<include layout="@layout/calc_donate_button"/>
<include layout="@layout/calc_square_brackets_button"/>
<include layout="@layout/calc_empty_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_square_brackets_button"/>
</LinearLayout>

View File

@@ -16,7 +16,13 @@
<LinearLayout a:layout_weight="1" a:layout_width="fill_parent" a:layout_height="0dp">
<include layout="@layout/calc_equals_button"
a:layout_weight="4"
a:layout_width="fill_parent"
a:layout_height="fill_parent"/>
<include layout="@layout/calc_display"
a:layout_weight="1"
a:layout_width="fill_parent"
a:layout_height="fill_parent"/>

View File

@@ -10,7 +10,6 @@
xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/calculatorDisplay"
style="@style/display_style"
a:layout_weight="1"
a:minLines="1"
a:maxLines="1"
a:textStyle="bold"

View File

@@ -0,0 +1,10 @@
<?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
-->
<org.solovyev.android.view.widgets.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
style="?controlButtonStyle"/>

View File

@@ -7,8 +7,11 @@
-->
<org.solovyev.android.view.widgets.DirectionDragButton
xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/equalsButton"
calc:textUp="≡"
a:text="="
calc:directionTextScale="0.5"
a:layout_width="fill_parent"
a:layout_height="fill_parent"
style="?controlButtonStyle"