android-calculatorpp/res/layout-port/main.xml

213 lines
8.5 KiB
XML
Raw Normal View History

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">
2011-10-04 17:41:40 -04:00
<org.solovyev.android.calculator.CalculatorEditor
2011-09-10 18:38:45 -04:00
a:id="@+id/editText"
style="@style/display_style"
2011-09-11 09:17:20 -04:00
a:inputType="textMultiLine"
2011-09-10 18:38:45 -04:00
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-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/equalsButton"
2011-09-28 16:11:12 -04:00
a:text="="
a:layout_width="fill_parent"
a:layout_weight="4"
style="@style/control_button_style"
a:onClick="numericButtonClickHandler"/>
2011-09-11 09:17:20 -04:00
2011-09-17 16:08:04 -04:00
<org.solovyev.android.calculator.CalculatorDisplay
2011-09-10 18:38:45 -04:00
a:id="@+id/resultEditText"
style="@style/display_style"
a:gravity="right|top"
2011-09-11 09:17:20 -04:00
a:layout_weight="1"
2011-09-10 18:38:45 -04:00
a:minLines="1"
a:maxLines="1"
2011-09-11 09:17:20 -04:00
a:textStyle="bold"
2011-09-10 18:38:45 -04:00
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">
2011-09-28 16:11:12 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/oneDigitButton" a:text="1" calc:textUp="sin"
2011-09-28 16:11:12 -04:00
calc:textDown="asin" style="@style/digit_button_style"
a:onClick="digitButtonClickHandler"/>
2011-09-10 14:20:58 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/twoDigitButton" a:text="2" calc:textUp="cos"
2011-09-28 16:11:12 -04:00
calc:textDown="acos" style="@style/digit_button_style"
a:onClick="digitButtonClickHandler"/>
2011-09-10 14:20:58 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/threeDigitButton" a:text="3" calc:textUp="tan"
2011-09-28 16:11:12 -04:00
calc:textDown="atan" style="@style/digit_button_style"
a:onClick="digitButtonClickHandler"/>
2011-09-10 14:20:58 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/multiplicationButton" a:text="×"
2011-09-28 16:11:12 -04:00
calc:textUp="^"
calc:textDown="^2" style="@style/digit_button_style"
a:onClick="digitButtonClickHandler"/>
2011-09-10 18:38:45 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/clearButton"
2011-09-28 16:11:12 -04:00
a:text="@string/c_clear"
style="@style/control_button_style"
a:onClick="clearButtonClickHandler"/>
2011-09-12 16:32:02 -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-28 16:11:12 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/fourDigitButton"
2011-09-28 16:11:12 -04:00
a:text="4"
calc:textUp="sinh"
calc:textDown="asinh"
style="@style/digit_button_style"
a:onClick="digitButtonClickHandler"/>
2011-09-10 18:38:45 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/fiveDigitButton"
2011-09-28 16:11:12 -04:00
a:text="5"
calc:textUp="cosh"
calc:textDown="acosh"
style="@style/digit_button_style"
a:onClick="digitButtonClickHandler"/>
2011-09-10 18:38:45 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/sixDigitButton" a:text="6"
2011-09-28 16:11:12 -04:00
calc:textUp="tanh"
calc:textDown="atanh"
style="@style/digit_button_style"
a:onClick="digitButtonClickHandler"/>
2011-09-10 18:38:45 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/divisionButton" a:text="/"
2011-09-28 16:11:12 -04:00
calc:textUp="√"
style="@style/digit_button_style"
a:onClick="digitButtonClickHandler"/>
2011-09-10 14:20:58 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/eraseButton"
2011-09-28 16:11:12 -04:00
a:text="↚"
style="@style/control_button_style"
a:onClick="eraseButtonClickHandler"/>
2011-09-12 16:32:02 -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-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/sevenDigitButton" a:text="7"
2011-09-28 16:11:12 -04:00
calc:textUp="i"
calc:textDown=""
style="@style/digit_button_style"
a:onClick="digitButtonClickHandler"/>
2011-09-10 14:20:58 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/eightDigitButton" a:text="8"
2011-09-28 16:11:12 -04:00
calc:textUp="ln"
calc:textDown=""
style="@style/digit_button_style"
a:onClick="digitButtonClickHandler"/>
2011-09-10 14:20:58 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/nineDigitButton" a:text="9"
2011-09-28 16:11:12 -04:00
calc:textDown="e"
calc:textUp="π"
style="@style/digit_button_style"
a:onClick="digitButtonClickHandler"/>
2011-09-10 14:20:58 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/plusButton" a:text="+"
2011-09-28 16:11:12 -04:00
style="@style/digit_button_style"
a:onClick="digitButtonClickHandler"/>
2011-09-10 14:20:58 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/pasteButton"
2011-09-28 16:11:12 -04:00
a:text="@string/c_paste"
style="@style/control_button_style"
a:onClick="pasteButtonClickHandler"/>
2011-09-12 16:32:02 -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:32:54 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/roundBracketsButton" a:text="()"
2011-09-28 16:11:12 -04:00
calc:textUp="("
calc:textDown=")" style="@style/digit_button_style"
a:onClick="digitButtonClickHandler"/>
2011-09-10 14:32:54 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/zeroDigitButton" a:text="0"
2011-09-28 16:11:12 -04:00
calc:textUp="."
calc:textDown=","
style="@style/digit_button_style"
a:onClick="digitButtonClickHandler"/>
2011-09-10 14:32:54 -04:00
2011-09-10 14:20:58 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/squareBracketsButton" a:text="[]"
2011-09-28 16:11:12 -04:00
calc:textUp="["
calc:textDown="]" style="@style/digit_button_style"
a:onClick="digitButtonClickHandler"/>
2011-09-10 14:20:58 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/subtractionButton" a:text="-"
2011-09-28 16:11:12 -04:00
calc:textUp="{"
calc:textDown="}"
style="@style/digit_button_style"
a:onClick="digitButtonClickHandler"/>
2011-09-10 14:32:54 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/historyButton"
2011-09-28 16:11:12 -04:00
a:text=""
calc:textUp="@string/c_undo"
calc:textDown="@string/c_redo"
style="@style/control_button_style"/>
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-19 04:36:12 -04:00
<!-- <org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/numericButton" a:text="numeric"
2011-09-13 03:20:17 -04:00
style="@style/digit_button_style"
2011-09-11 09:17:20 -04:00
a:onClick="numericButtonClickHandler"/>
2011-09-10 14:20:58 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/simplifyButton" a:text="simplify"
2011-09-13 03:20:17 -04:00
style="@style/digit_button_style"
2011-09-11 09:17:20 -04:00
a:onClick="simplifyButtonClickHandler"/>-->
2011-09-10 14:20:58 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:id="@+id/leftButton"
2011-09-28 16:11:12 -04:00
calc:textUp="↞"
a:text="←"
style="@style/control_button_style"
a:onClick="moveLeftButtonClickHandler"/>
<org.solovyev.android.view.widgets.DirectionDragButton
a:id="@+id/rightButton"
calc:textUp="↠"
a:text="→"
style="@style/control_button_style"
a:onClick="moveRightButtonClickHandler"/>
<org.solovyev.android.view.widgets.DirectionDragButton
a:id="@+id/varsButton"
a:text="@string/c_vars"
a:onClick="varsButtonClickHandler"
style="@style/control_button_style"/>
2011-09-12 16:32:02 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:text="" style="@style/control_button_style"/>
2011-09-12 16:32:02 -04:00
2011-09-19 04:36:12 -04:00
<org.solovyev.android.view.widgets.DirectionDragButton a:text="" style="@style/control_button_style"/>
2011-09-11 09:17:20 -04:00
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>