2011-06-23 17:09:13 -04:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
|
|
|
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
|
|
|
|
xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
|
|
|
a:orientation="vertical"
|
|
|
|
a:layout_width="match_parent"
|
|
|
|
a:layout_height="match_parent"
|
|
|
|
a:background="#ff000000">
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
a:layout_width="match_parent"
|
2011-09-10 18:38:45 -04:00
|
|
|
a:layout_height="match_parent"
|
|
|
|
a:orientation="vertical"
|
|
|
|
a:layout_gravity="center">
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<LinearLayout a:layout_weight="2" a:layout_width="match_parent" a:layout_height="0dp">
|
|
|
|
|
|
|
|
<EditText
|
|
|
|
a:id="@+id/editText"
|
|
|
|
style="@style/display_style"
|
|
|
|
a:singleLine="false"/>
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp">
|
2011-09-10 14:20:58 -04:00
|
|
|
|
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<EditText
|
|
|
|
a:id="@+id/resultEditText"
|
|
|
|
style="@style/display_style"
|
|
|
|
a:gravity="right|top"
|
|
|
|
a:minLines="1"
|
|
|
|
a:maxLines="1"
|
|
|
|
a:scrollHorizontally="true"
|
|
|
|
a:scrollbars="none"/>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp">
|
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/oneDigitButton" a:text="1" calc:textUp="sin"
|
|
|
|
calc:textDown="asin" style="@style/digitButtonStyle"
|
|
|
|
a:onClick="digitButtonClickHandler"/>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/twoDigitButton" a:text="2" calc:textUp="cos"
|
|
|
|
calc:textDown="acos" style="@style/digitButtonStyle"
|
|
|
|
a:onClick="digitButtonClickHandler"/>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/threeDigitButton" a:text="3" calc:textUp="tg"
|
|
|
|
calc:textDown="atg" style="@style/digitButtonStyle"
|
|
|
|
a:onClick="digitButtonClickHandler"/>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/muliplicationButton" a:text="*"
|
|
|
|
calc:textUp="^"
|
|
|
|
calc:textDown="^2" style="@style/digitButtonStyle"
|
|
|
|
a:onClick="digitButtonClickHandler"/>
|
|
|
|
|
|
|
|
</LinearLayout>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp">
|
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/fourDigitButton"
|
|
|
|
a:text="4"
|
|
|
|
calc:textUp=""
|
|
|
|
calc:textDown=""
|
|
|
|
style="@style/digitButtonStyle"
|
|
|
|
a:onClick="digitButtonClickHandler"/>
|
|
|
|
|
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/fiveDigitButton"
|
|
|
|
a:text="5"
|
|
|
|
calc:textUp="ln"
|
|
|
|
style="@style/digitButtonStyle"
|
|
|
|
a:onClick="digitButtonClickHandler"/>
|
|
|
|
|
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/sixDigitButton" a:text="6"
|
|
|
|
calc:textUp=""
|
|
|
|
calc:textDown="" style="@style/digitButtonStyle"
|
|
|
|
a:onClick="digitButtonClickHandler"/>
|
|
|
|
|
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/divisionButton" a:text="/"
|
|
|
|
calc:textUp="√"
|
|
|
|
style="@style/digitButtonStyle"
|
|
|
|
a:onClick="digitButtonClickHandler"/>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
</LinearLayout>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp">
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/sevenDigitButton" a:text="7" calc:textUp=""
|
|
|
|
calc:textDown="" style="@style/digitButtonStyle"
|
|
|
|
a:onClick="digitButtonClickHandler"/>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/eigthDigitButton" a:text="8" calc:textUp=""
|
|
|
|
calc:textDown="" style="@style/digitButtonStyle"
|
|
|
|
a:onClick="digitButtonClickHandler"/>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/nineDigitButton" a:text="9"
|
|
|
|
calc:textDown="e"
|
|
|
|
calc:textUp="π"
|
|
|
|
style="@style/digitButtonStyle"
|
|
|
|
a:onClick="digitButtonClickHandler"/>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/plusButton" a:text="+"
|
|
|
|
style="@style/digitButtonStyle"
|
|
|
|
a:onClick="digitButtonClickHandler"/>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
</LinearLayout>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp">
|
2011-09-10 14:32:54 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/roundBracketsButton" a:text="()"
|
|
|
|
calc:textUp="("
|
|
|
|
calc:textDown=")" style="@style/digitButtonStyle"
|
|
|
|
a:onClick="digitButtonClickHandler"/>
|
2011-09-10 14:32:54 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/zeroDigitButton" a:text="0"
|
|
|
|
calc:textUp="."
|
|
|
|
calc:textDown=","
|
|
|
|
style="@style/digitButtonStyle"
|
|
|
|
a:onClick="digitButtonClickHandler"/>
|
2011-09-10 14:32:54 -04:00
|
|
|
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/squareBracketsButton" a:text="[]"
|
|
|
|
calc:textUp="["
|
|
|
|
calc:textDown="]" style="@style/digitButtonStyle"
|
|
|
|
a:onClick="digitButtonClickHandler"/>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/subtractionButton" a:text="-"
|
|
|
|
calc:textUp="{"
|
|
|
|
calc:textDown="}"
|
|
|
|
style="@style/digitButtonStyle"
|
|
|
|
a:onClick="digitButtonClickHandler"/>
|
2011-09-10 14:32:54 -04:00
|
|
|
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
</LinearLayout>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp">
|
2011-09-10 14:20:58 -04:00
|
|
|
|
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/equalsButton"
|
|
|
|
a:text="="
|
|
|
|
a:layout_width="fill_parent"
|
|
|
|
style="@style/controlButtonStyle"
|
|
|
|
a:onClick="numericButtonClickHandler"/>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<!-- <org.solovyev.android.view.DirectionDragButton a:id="@+id/numericButton" a:text="numeric"
|
|
|
|
style="@style/digitButtonStyle"
|
|
|
|
a:onClick="numericButtonClickHandler"/>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/simplifyButton" a:text="simplify"
|
|
|
|
style="@style/digitButtonStyle"
|
|
|
|
a:onClick="simplifyButtonClickHandler"/>-->
|
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/eraseButton"
|
|
|
|
a:text="↚"
|
|
|
|
style="@style/controlButtonStyle"
|
|
|
|
a:onClick="eraseButtonClickHandler"/>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/leftButton"
|
|
|
|
a:text="←"
|
|
|
|
style="@style/controlButtonStyle"
|
|
|
|
a:onClick="moveLeftButtonClickHandler"/>
|
2011-09-10 14:32:54 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/rightButton"
|
|
|
|
a:text="→"
|
|
|
|
style="@style/controlButtonStyle"
|
|
|
|
a:onClick="moveRightButtonClickHandler"/>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
2011-09-10 18:38:45 -04:00
|
|
|
<org.solovyev.android.view.DirectionDragButton a:id="@+id/historyButton"
|
|
|
|
a:text="clear"
|
|
|
|
calc:textUp="undo"
|
|
|
|
calc:textDown="redo"
|
|
|
|
style="@style/controlButtonStyle"
|
|
|
|
a:onClick="clearButtonClickHandler"/>
|
2011-09-10 14:20:58 -04:00
|
|
|
|
|
|
|
</LinearLayout>
|
2011-09-10 18:38:45 -04:00
|
|
|
</LinearLayout>
|
2011-06-23 17:09:13 -04:00
|
|
|
</LinearLayout>
|