large screen support + fix for numeral buttons
This commit is contained in:
parent
551cb3b2f7
commit
a60e0caeb8
@ -10,18 +10,14 @@
|
|||||||
a:layout_height="0dp">
|
a:layout_height="0dp">
|
||||||
|
|
||||||
<include layout="@layout/calc_left_button"/>
|
<include layout="@layout/calc_left_button"/>
|
||||||
<include layout="@layout/calc_vars_button"/>
|
<include layout="@layout/calc_erase_button"/>
|
||||||
<include layout="@layout/calc_copy_button"/>
|
<include layout="@layout/calc_donate_button"/>
|
||||||
<include layout="@layout/calc_six_digit_button"/>
|
|
||||||
<include layout="@layout/calc_seven_digit_button"/>
|
<include layout="@layout/calc_seven_digit_button"/>
|
||||||
<include layout="@layout/calc_eight_digit_button"/>
|
<include layout="@layout/calc_eight_digit_button"/>
|
||||||
<include layout="@layout/calc_nine_digit_button"/>
|
<include layout="@layout/calc_nine_digit_button"/>
|
||||||
<include layout="@layout/calc_zero_digit_button"/>
|
|
||||||
<include layout="@layout/calc_multiplication_button"/>
|
<include layout="@layout/calc_multiplication_button"/>
|
||||||
<include layout="@layout/calc_division_button"/>
|
<include layout="@layout/calc_division_button"/>
|
||||||
<include layout="@layout/calc_equals_button"/>
|
<include layout="@layout/calc_clear_button"/>
|
||||||
<include layout="@layout/calc_operators_button"/>
|
|
||||||
<include layout="@layout/calc_donate_button"/>
|
|
||||||
<include layout="@layout/calc_right_button"/>
|
<include layout="@layout/calc_right_button"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@ -30,20 +26,33 @@
|
|||||||
a:layout_width="match_parent"
|
a:layout_width="match_parent"
|
||||||
a:layout_height="0dp">
|
a:layout_height="0dp">
|
||||||
|
|
||||||
<include layout="@layout/calc_erase_button"/>
|
<include layout="@layout/calc_vars_button"/>
|
||||||
<include layout="@layout/calc_functions_button"/>
|
<include layout="@layout/calc_functions_button"/>
|
||||||
<include layout="@layout/calc_paste_button"/>
|
<include layout="@layout/calc_empty_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_copy_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_empty_button"/>
|
||||||
|
<include layout="@layout/calc_operators_button"/>
|
||||||
|
<include layout="@layout/calc_dot_button"/>
|
||||||
<include layout="@layout/calc_one_digit_button"/>
|
<include layout="@layout/calc_one_digit_button"/>
|
||||||
<include layout="@layout/calc_two_digit_button"/>
|
<include layout="@layout/calc_two_digit_button"/>
|
||||||
<include layout="@layout/calc_three_digit_button"/>
|
<include layout="@layout/calc_three_digit_button"/>
|
||||||
<include layout="@layout/calc_four_digit_button"/>
|
<include layout="@layout/calc_zero_digit_button"/>
|
||||||
<include layout="@layout/calc_five_digit_button"/>
|
|
||||||
<include layout="@layout/calc_plus_button"/>
|
|
||||||
<include layout="@layout/calc_subtraction_button"/>
|
|
||||||
<include layout="@layout/calc_round_brackets_button"/>
|
<include layout="@layout/calc_round_brackets_button"/>
|
||||||
<include layout="@layout/calc_dot_button"/>
|
<include layout="@layout/calc_paste_button"/>
|
||||||
<include layout="@layout/calc_history_button"/>
|
<include layout="@layout/calc_history_button"/>
|
||||||
<include layout="@layout/calc_clear_button"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
a:layout_height="0dp"
|
a:layout_height="0dp"
|
||||||
a:layout_width="match_parent"
|
a:layout_width="match_parent"
|
||||||
a:layout_weight="5"
|
a:layout_weight="3"
|
||||||
a:orientation="horizontal"
|
a:orientation="horizontal"
|
||||||
a:baselineAligned="false">
|
a:baselineAligned="false">
|
||||||
|
|
||||||
@ -29,7 +29,7 @@
|
|||||||
a:layout_height="0dp"
|
a:layout_height="0dp"
|
||||||
a:layout_width="match_parent"
|
a:layout_width="match_parent"
|
||||||
style="?paneStyle"
|
style="?paneStyle"
|
||||||
a:layout_weight="3"/>
|
a:layout_weight="1"/>
|
||||||
|
|
||||||
<LinearLayout a:id="@+id/displayContainer"
|
<LinearLayout a:id="@+id/displayContainer"
|
||||||
a:layout_height="0dp"
|
a:layout_height="0dp"
|
||||||
@ -51,7 +51,7 @@
|
|||||||
<LinearLayout a:id="@+id/keyboardContainer"
|
<LinearLayout a:id="@+id/keyboardContainer"
|
||||||
a:layout_height="0dp"
|
a:layout_height="0dp"
|
||||||
a:layout_width="match_parent"
|
a:layout_width="match_parent"
|
||||||
a:layout_weight="1"
|
a:layout_weight="2"
|
||||||
style="?paneStyleTransparent"/>
|
style="?paneStyleTransparent"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -11,11 +11,10 @@
|
|||||||
|
|
||||||
<include layout="@layout/calc_left_button"/>
|
<include layout="@layout/calc_left_button"/>
|
||||||
<include layout="@layout/calc_erase_button"/>
|
<include layout="@layout/calc_erase_button"/>
|
||||||
<include layout="@layout/calc_empty_button"/>
|
<include layout="@layout/calc_seven_digit_button"/>
|
||||||
<include layout="@layout/calc_empty_button"/>
|
<include layout="@layout/calc_eight_digit_button"/>
|
||||||
<include layout="@layout/calc_empty_button"/>
|
<include layout="@layout/calc_nine_digit_button"/>
|
||||||
<include layout="@layout/calc_empty_button"/>
|
<include layout="@layout/calc_multiplication_button"/>
|
||||||
<include layout="@layout/calc_clear_button"/>
|
|
||||||
<include layout="@layout/calc_right_button"/>
|
<include layout="@layout/calc_right_button"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@ -25,13 +24,12 @@
|
|||||||
a:layout_height="0dp">
|
a:layout_height="0dp">
|
||||||
|
|
||||||
<include layout="@layout/calc_vars_button"/>
|
<include layout="@layout/calc_vars_button"/>
|
||||||
<include layout="@layout/calc_copy_button"/>
|
<include layout="@layout/calc_clear_button"/>
|
||||||
<include layout="@layout/calc_seven_digit_button"/>
|
<include layout="@layout/calc_four_digit_button"/>
|
||||||
<include layout="@layout/calc_eight_digit_button"/>
|
<include layout="@layout/calc_five_digit_button"/>
|
||||||
<include layout="@layout/calc_nine_digit_button"/>
|
<include layout="@layout/calc_six_digit_button"/>
|
||||||
<include layout="@layout/calc_multiplication_button"/>
|
|
||||||
<include layout="@layout/calc_division_button"/>
|
<include layout="@layout/calc_division_button"/>
|
||||||
<include layout="@layout/calc_equals_button"/>
|
<include layout="@layout/calc_copy_button"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -40,13 +38,12 @@
|
|||||||
a:layout_height="0dp">
|
a:layout_height="0dp">
|
||||||
|
|
||||||
<include layout="@layout/calc_functions_button"/>
|
<include layout="@layout/calc_functions_button"/>
|
||||||
<include layout="@layout/calc_paste_button"/>
|
<include layout="@layout/calc_equals_button"/>
|
||||||
<include layout="@layout/calc_four_digit_button"/>
|
<include layout="@layout/calc_one_digit_button"/>
|
||||||
<include layout="@layout/calc_five_digit_button"/>
|
<include layout="@layout/calc_two_digit_button"/>
|
||||||
<include layout="@layout/calc_six_digit_button"/>
|
<include layout="@layout/calc_three_digit_button"/>
|
||||||
<include layout="@layout/calc_plus_button"/>
|
<include layout="@layout/calc_plus_button"/>
|
||||||
<include layout="@layout/calc_subtraction_button"/>
|
<include layout="@layout/calc_paste_button"/>
|
||||||
<include layout="@layout/calc_round_brackets_button"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -56,11 +53,10 @@
|
|||||||
|
|
||||||
<include layout="@layout/calc_operators_button"/>
|
<include layout="@layout/calc_operators_button"/>
|
||||||
<include layout="@layout/calc_donate_button"/>
|
<include layout="@layout/calc_donate_button"/>
|
||||||
<include layout="@layout/calc_one_digit_button"/>
|
<include layout="@layout/calc_round_brackets_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_zero_digit_button"/>
|
||||||
<include layout="@layout/calc_dot_button"/>
|
<include layout="@layout/calc_dot_button"/>
|
||||||
|
<include layout="@layout/calc_subtraction_button"/>
|
||||||
<include layout="@layout/calc_history_button"/>
|
<include layout="@layout/calc_history_button"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
<LinearLayout a:id="@+id/keyboardContainer"
|
<LinearLayout a:id="@+id/keyboardContainer"
|
||||||
a:layout_height="0dp"
|
a:layout_height="0dp"
|
||||||
a:layout_width="match_parent"
|
a:layout_width="match_parent"
|
||||||
a:layout_weight="1"
|
a:layout_weight="2"
|
||||||
style="?paneStyleTransparent"/>
|
style="?paneStyleTransparent"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
51
calculatorpp/res/layout-xlarge-land/calc_keyboard.xml
Normal file
51
calculatorpp/res/layout-xlarge-land/calc_keyboard.xml
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<?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_left_button"/>
|
||||||
|
<include layout="@layout/calc_vars_button"/>
|
||||||
|
<include layout="@layout/calc_copy_button"/>
|
||||||
|
<include layout="@layout/calc_six_digit_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_multiplication_button"/>
|
||||||
|
<include layout="@layout/calc_division_button"/>
|
||||||
|
<include layout="@layout/calc_equals_button"/>
|
||||||
|
<include layout="@layout/calc_operators_button"/>
|
||||||
|
<include layout="@layout/calc_donate_button"/>
|
||||||
|
<include layout="@layout/calc_right_button"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout a:layout_weight="1"
|
||||||
|
a:layout_width="match_parent"
|
||||||
|
a:layout_height="0dp">
|
||||||
|
|
||||||
|
<include layout="@layout/calc_erase_button"/>
|
||||||
|
<include layout="@layout/calc_functions_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_four_digit_button"/>
|
||||||
|
<include layout="@layout/calc_five_digit_button"/>
|
||||||
|
<include layout="@layout/calc_plus_button"/>
|
||||||
|
<include layout="@layout/calc_subtraction_button"/>
|
||||||
|
<include layout="@layout/calc_round_brackets_button"/>
|
||||||
|
<include layout="@layout/calc_dot_button"/>
|
||||||
|
<include layout="@layout/calc_history_button"/>
|
||||||
|
<include layout="@layout/calc_clear_button"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
57
calculatorpp/res/layout-xlarge-land/main_calculator.xml
Normal file
57
calculatorpp/res/layout-xlarge-land/main_calculator.xml
Normal 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="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>
|
68
calculatorpp/res/layout-xlarge/calc_keyboard.xml
Normal file
68
calculatorpp/res/layout-xlarge/calc_keyboard.xml
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
<?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_left_button"/>
|
||||||
|
<include layout="@layout/calc_erase_button"/>
|
||||||
|
<include layout="@layout/calc_empty_button"/>
|
||||||
|
<include layout="@layout/calc_empty_button"/>
|
||||||
|
<include layout="@layout/calc_empty_button"/>
|
||||||
|
<include layout="@layout/calc_empty_button"/>
|
||||||
|
<include layout="@layout/calc_clear_button"/>
|
||||||
|
<include layout="@layout/calc_right_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_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>
|
57
calculatorpp/res/layout-xlarge/main_calculator.xml
Normal file
57
calculatorpp/res/layout-xlarge/main_calculator.xml
Normal 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>
|
@ -88,6 +88,7 @@ public enum AndroidNumeralBase {
|
|||||||
|
|
||||||
protected void toggleButton(boolean show, @NotNull DirectionDragButton button) {
|
protected void toggleButton(boolean show, @NotNull DirectionDragButton button) {
|
||||||
button.setShowText(show);
|
button.setShowText(show);
|
||||||
|
button.invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
Loading…
Reference in New Issue
Block a user