This commit is contained in:
Sergey Solovyev
2012-10-02 01:27:45 +04:00
parent 9b6e3337c5
commit 999299d9bb
11 changed files with 336 additions and 122 deletions

View File

@@ -6,11 +6,23 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.calculator.AndroidCalculatorDisplayView
xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/calculatorDisplay"
style="@style/display_style"
a:inputType="textMultiLine"
a:maxLines="3"
a:scrollHorizontally="false"
a:scrollbars="none"/>
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/main_fragment_layout"
style="?fragmentLayoutStyle"
a:layout_width="match_parent"
a:layout_height="match_parent">
<TextView a:id="@+id/fragmentTitle"
a:layout_height="wrap_content"
a:layout_width="match_parent"
style="?fragmentTitleStyle"/>
<org.solovyev.android.calculator.AndroidCalculatorDisplayView
a:id="@+id/calculatorDisplay"
style="@style/display_style"
a:inputType="textMultiLine"
a:maxLines="3"
a:scrollHorizontally="false"
a:scrollbars="none"/>
</LinearLayout>

View File

@@ -1,57 +1,57 @@
<?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
-->
<LinearLayout
xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/main_layout"
a:orientation="vertical"
style="?mainMultiPaneLayoutStyle">
<LinearLayout
a:layout_height="0dp"
a:layout_width="match_parent"
a:layout_weight="5"
a:orientation="horizontal"
a:baselineAligned="false">
<LinearLayout
a:layout_height="match_parent"
a:layout_width="0dp"
a:layout_weight="1"
a:orientation="vertical"
a:layout_gravity="center">
<LinearLayout a:id="@+id/editorContainer"
a:layout_height="0dp"
a:layout_width="match_parent"
style="?paneStyle"
a:layout_weight="4"/>
<LinearLayout a:id="@+id/displayContainer"
a:layout_height="0dp"
a:layout_width="match_parent"
style="?paneStyle"
a:layout_weight="1"/>
</LinearLayout>
<LinearLayout a:id="@+id/main_second_pane"
a:layout_height="match_parent"
a:layout_width="0dp"
a:layout_weight="1"
a:orientation="vertical"
style="?paneStyle"/>
</LinearLayout>
<LinearLayout a:id="@+id/keyboardContainer"
a:layout_height="0dp"
a:layout_width="match_parent"
a:layout_weight="1"
style="?paneStyleTransparent"/>
</LinearLayout>
<?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
-->
<LinearLayout
xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/main_layout"
a:orientation="vertical"
style="?mainMultiPaneLayoutStyle">
<LinearLayout
a:layout_height="0dp"
a:layout_width="match_parent"
a:layout_weight="5"
a:orientation="horizontal"
a:baselineAligned="false">
<LinearLayout
a:layout_height="match_parent"
a:layout_width="0dp"
a:layout_weight="1"
a:orientation="vertical"
a:layout_gravity="center">
<LinearLayout a:id="@+id/editorContainer"
a:layout_height="0dp"
a:layout_width="match_parent"
style="?paneStyle"
a:layout_weight="3"/>
<LinearLayout a:id="@+id/displayContainer"
a:layout_height="0dp"
a:layout_width="match_parent"
style="?paneStyle"
a:layout_weight="1"/>
</LinearLayout>
<LinearLayout a:id="@+id/main_second_pane"
a:layout_height="match_parent"
a:layout_width="0dp"
a:layout_weight="1"
a:orientation="vertical"
style="?paneStyle"/>
</LinearLayout>
<LinearLayout a:id="@+id/keyboardContainer"
a:layout_height="0dp"
a:layout_width="match_parent"
a:layout_weight="1"
style="?paneStyleTransparent"/>
</LinearLayout>

View File

@@ -0,0 +1,28 @@
<?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
-->
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/main_fragment_layout"
style="?fragmentLayoutStyle"
a:layout_width="match_parent"
a:layout_height="match_parent">
<TextView a:id="@+id/fragmentTitle"
a:layout_height="wrap_content"
a:layout_width="match_parent"
style="?fragmentTitleStyle"/>
<org.solovyev.android.calculator.AndroidCalculatorDisplayView
a:id="@+id/calculatorDisplay"
style="@style/display_style"
a:inputType="textMultiLine"
a:maxLines="3"
a:scrollHorizontally="false"
a:scrollbars="none"/>
</LinearLayout>

View File

@@ -0,0 +1,28 @@
<?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
-->
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/main_fragment_layout"
style="?fragmentLayoutStyle"
a:layout_width="match_parent"
a:layout_height="match_parent">
<TextView a:id="@+id/fragmentTitle"
a:layout_height="wrap_content"
a:layout_width="match_parent"
style="?fragmentTitleStyle"/>
<org.solovyev.android.calculator.AndroidCalculatorEditorView
a:id="@+id/calculatorEditor"
style="@style/editor_style"
a:textIsSelectable="true"
a:singleLine="false"
a:scrollbars="vertical"
a:hint ="@string/c_calc_editor_hint"/>
</LinearLayout>

View File

@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:layout_width="match_parent"
a:layout_height="match_parent"
a:orientation="vertical">
<LinearLayout a:layout_weight="1"
a:layout_width="match_parent"
a:layout_height="0dp">
<include layout="@layout/calc_vars_button"/>
<include layout="@layout/calc_copy_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_multiplication_button"/>
<include layout="@layout/calc_division_button"/>
<include layout="@layout/calc_equals_button"/>
</LinearLayout>
<LinearLayout a:layout_weight="1"
a:layout_width="match_parent"
a:layout_height="0dp">
<include layout="@layout/calc_functions_button"/>
<include layout="@layout/calc_paste_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_round_brackets_button"/>
</LinearLayout>
<LinearLayout a:layout_weight="1"
a:layout_width="match_parent"
a:layout_height="0dp">
<include layout="@layout/calc_operators_button"/>
<include layout="@layout/calc_donate_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_zero_digit_button"/>
<include layout="@layout/calc_dot_button"/>
<include layout="@layout/calc_history_button"/>
</LinearLayout>
</LinearLayout>

View File

@@ -0,0 +1,57 @@
<?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
-->
<LinearLayout
xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/main_layout"
a:orientation="vertical"
style="?mainMultiPaneLayoutStyle">
<LinearLayout
a:layout_height="0dp"
a:layout_width="match_parent"
a:layout_weight="3"
a:orientation="horizontal"
a:baselineAligned="false">
<LinearLayout
a:layout_height="match_parent"
a:layout_width="0dp"
a:layout_weight="1"
a:orientation="vertical"
a:layout_gravity="center">
<LinearLayout a:id="@+id/editorContainer"
a:layout_height="0dp"
a:layout_width="match_parent"
style="?paneStyle"
a:layout_weight="4"/>
<LinearLayout a:id="@+id/displayContainer"
a:layout_height="0dp"
a:layout_width="match_parent"
style="?paneStyle"
a:layout_weight="1"/>
</LinearLayout>
<LinearLayout a:id="@+id/main_second_pane"
a:layout_height="match_parent"
a:layout_width="0dp"
a:layout_weight="1"
a:orientation="vertical"
style="?paneStyle"/>
</LinearLayout>
<LinearLayout a:id="@+id/keyboardContainer"
a:layout_height="0dp"
a:layout_width="match_parent"
a:layout_weight="1"
style="?paneStyleTransparent"/>
</LinearLayout>

View File

@@ -1,3 +1,5 @@
<resources>
<dimen name="keyboard_button_text_size">40dp</dimen>
<resources>
<dimen name="editor_text_size">15sp</dimen>
<dimen name="display_text_size">15sp</dimen>
<dimen name="keyboard_button_text_size">20dp</dimen>
</resources>

View File

@@ -208,5 +208,6 @@
<string name="convert_to_dec">Convert to dec</string>
<string name="editor">Editor</string>
<string name="result">Result</string>
</resources>