summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/drawable/ic_history_grey600_48dp.xml29
-rw-r--r--res/layout/activity_calculator_land.xml2
-rw-r--r--res/layout/activity_calculator_main.xml34
-rw-r--r--res/layout/activity_calculator_port.xml2
-rw-r--r--res/layout/dialog_message.xml9
-rw-r--r--res/layout/display_one_line.xml2
-rw-r--r--res/layout/display_two_line.xml9
-rw-r--r--res/layout/empty_history_view.xml31
-rw-r--r--res/layout/fragment_history.xml50
-rw-r--r--res/layout/history_item.xml74
-rw-r--r--res/layout/pad_advanced_3x5.xml137
-rw-r--r--res/layout/pad_advanced_4x4.xml137
-rw-r--r--res/layout/pad_advanced_5x3.xml137
-rw-r--r--res/layout/pad_numeric.xml82
-rw-r--r--res/layout/pad_operator_one_col.xml47
-rw-r--r--res/layout/pad_operator_two_col.xml53
-rw-r--r--res/menu/activity_calculator.xml4
-rw-r--r--res/menu/fragment_history.xml23
-rw-r--r--res/menu/menu_formula.xml (renamed from res/menu/paste.xml)5
-rw-r--r--res/menu/menu_result.xml (renamed from res/menu/copy.xml)19
-rw-r--r--res/values-w230dp-h220dp/styles.xml94
-rw-r--r--res/values-w230dp-h275dp/dimens.xml34
-rw-r--r--res/values-w230dp-h275dp/styles.xml20
-rw-r--r--res/values-w230dp-h375dp/dimens.xml34
-rw-r--r--res/values-w230dp-h375dp/styles.xml18
-rw-r--r--res/values-w230dp-h475dp-port/dimens.xml34
-rw-r--r--res/values-w230dp-h475dp-port/styles.xml18
-rw-r--r--res/values-w375dp-h220dp/dimens.xml34
-rw-r--r--res/values-w375dp-h220dp/styles.xml20
-rw-r--r--res/values-w375dp-h275dp/dimens.xml34
-rw-r--r--res/values-w375dp-h275dp/styles.xml20
-rw-r--r--res/values-w375dp-h375dp/dimens.xml34
-rw-r--r--res/values-w375dp-h375dp/styles.xml18
-rw-r--r--res/values-w375dp-h500dp-port/dimens.xml34
-rw-r--r--res/values-w375dp-h500dp-port/styles.xml18
-rw-r--r--res/values-w375dp-h768dp-port/dimens.xml34
-rw-r--r--res/values-w375dp-h768dp-port/styles.xml18
-rw-r--r--res/values-w520dp-h220dp-land/dimens.xml34
-rw-r--r--res/values-w520dp-h220dp-land/styles.xml20
-rw-r--r--res/values-w520dp-h275dp-land/dimens.xml34
-rw-r--r--res/values-w520dp-h275dp-land/styles.xml18
-rw-r--r--res/values-w520dp-h375dp-land/dimens.xml34
-rw-r--r--res/values-w520dp-h375dp-land/styles.xml18
-rw-r--r--res/values-w520dp-h500dp-land/dimens.xml34
-rw-r--r--res/values-w520dp-h500dp-land/styles.xml18
-rw-r--r--res/values-w520dp-h768dp-land/dimens.xml34
-rw-r--r--res/values-w520dp-h768dp-land/styles.xml18
-rw-r--r--res/values-w520dp-h768dp-port/dimens.xml34
-rw-r--r--res/values-w520dp-h768dp-port/styles.xml18
-rw-r--r--res/values/attr.xml2
-rw-r--r--res/values/color.xml13
-rw-r--r--res/values/dimens.xml23
-rw-r--r--res/values/layout.xml (renamed from res/values-w230dp-h220dp/layout.xml)0
-rw-r--r--res/values/strings.xml44
-rw-r--r--res/values/styles.xml93
-rw-r--r--res/values/themes.xml3
56 files changed, 1217 insertions, 677 deletions
diff --git a/res/drawable/ic_history_grey600_48dp.xml b/res/drawable/ic_history_grey600_48dp.xml
new file mode 100644
index 0000000..65103fc
--- /dev/null
+++ b/res/drawable/ic_history_grey600_48dp.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportHeight="48.0"
+ android:viewportWidth="48.0">
+ <path
+ android:fillColor="#757575"
+ android:pathData="M25.99,6C16.04,6 8,14.06 8,24H2l7.79,7.79 0.14,0.29L18,24h-6c0,-7.73
+ 6.27,-14 14,-14s14,6.27 14,14 -6.27,14 -14,14c-3.87,0 -7.36,-1.58
+ -9.89,-4.11l-2.83,2.83C16.53,39.98 21.02,42 25.99,42 35.94,42 44,33.94 44,24S35.94,6
+ 25.99,6zM24,16v10l8.56,5.08L34,28.65l-7,-4.15V16h-3z" />
+</vector> \ No newline at end of file
diff --git a/res/layout/activity_calculator_land.xml b/res/layout/activity_calculator_land.xml
index 5dd2c20..a19cd86 100644
--- a/res/layout/activity_calculator_land.xml
+++ b/res/layout/activity_calculator_land.xml
@@ -37,4 +37,4 @@
</LinearLayout>
-</LinearLayout>
+</LinearLayout> \ No newline at end of file
diff --git a/res/layout/activity_calculator_main.xml b/res/layout/activity_calculator_main.xml
new file mode 100644
index 0000000..2e9d62d
--- /dev/null
+++ b/res/layout/activity_calculator_main.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<com.android.calculator2.DragLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/drag_layout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <include
+ android:id="@+id/main_calculator"
+ layout="@layout/activity_calculator" />
+
+ <FrameLayout
+ android:id="@+id/history_frame"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:visibility="invisible" />
+
+</com.android.calculator2.DragLayout>
diff --git a/res/layout/activity_calculator_port.xml b/res/layout/activity_calculator_port.xml
index 4cafa94..30aaf00 100644
--- a/res/layout/activity_calculator_port.xml
+++ b/res/layout/activity_calculator_port.xml
@@ -21,7 +21,7 @@
android:layout_height="match_parent"
android:orientation="vertical">
- <include layout="@layout/display"/>
+ <include layout="@layout/display" />
<com.android.calculator2.CalculatorPadViewPager
android:id="@+id/pad_pager"
diff --git a/res/layout/dialog_message.xml b/res/layout/dialog_message.xml
index 67e6089..233849e 100644
--- a/res/layout/dialog_message.xml
+++ b/res/layout/dialog_message.xml
@@ -15,13 +15,12 @@
limitations under the License.
-->
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+<TextView
+ xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingBottom="20dip"
- android:paddingEnd="16dip"
- android:paddingStart="20dip"
- android:paddingTop="20dip"
+ android:padding="20dip"
+ android:ellipsize="none"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textIsSelectable="true" />
diff --git a/res/layout/display_one_line.xml b/res/layout/display_one_line.xml
index c016b15..11760fb 100644
--- a/res/layout/display_one_line.xml
+++ b/res/layout/display_one_line.xml
@@ -39,7 +39,7 @@
android:overScrollMode="never"
android:scrollbars="none">
- <com.android.calculator2.CalculatorText
+ <com.android.calculator2.CalculatorFormula
android:id="@+id/formula"
style="@style/DisplayTextStyle.Formula"
android:layout_width="wrap_content"
diff --git a/res/layout/display_two_line.xml b/res/layout/display_two_line.xml
index 3735a85..3f7338d 100644
--- a/res/layout/display_two_line.xml
+++ b/res/layout/display_two_line.xml
@@ -33,17 +33,14 @@
android:overScrollMode="never"
android:scrollbars="none">
- <com.android.calculator2.CalculatorText
+ <com.android.calculator2.CalculatorFormula
android:id="@+id/formula"
style="@style/DisplayTextStyle.Formula"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:layout_gravity="bottom|end"
android:ellipsize="none"
- android:longClickable="true"
- android:singleLine="true"
- android:textColor="@color/display_formula_text_color"
- android:textIsSelectable="false" />
+ android:maxLines="1"
+ android:textColor="@color/display_formula_text_color" />
</com.android.calculator2.CalculatorScrollView>
diff --git a/res/layout/empty_history_view.xml b/res/layout/empty_history_view.xml
new file mode 100644
index 0000000..7814b52
--- /dev/null
+++ b/res/layout/empty_history_view.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/empty_history_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:drawableTop="@drawable/ic_history_grey600_48dp"
+ android:text="@string/no_history"
+ android:textSize="20sp" />
+
+</FrameLayout> \ No newline at end of file
diff --git a/res/layout/fragment_history.xml b/res/layout/fragment_history.xml
new file mode 100644
index 0000000..e5fe50e
--- /dev/null
+++ b/res/layout/fragment_history.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:clipChildren="false"
+ android:orientation="vertical">
+
+ <Toolbar
+ android:id="@+id/history_toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?android:attr/colorPrimary"
+ android:elevation="4dip"
+ android:minHeight="?android:attr/actionBarSize"
+ android:navigationContentDescription="@string/desc_navigate_up"
+ android:navigationIcon="?android:attr/homeAsUpIndicator"
+ android:popupTheme="@android:style/ThemeOverlay.Material.Light"
+ android:theme="@android:style/ThemeOverlay.Material.Dark.ActionBar"
+ android:title="@string/title_history" />
+
+ <android.support.v7.widget.RecyclerView
+ android:id="@+id/history_recycler_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@color/display_background_color"
+ android:clipChildren="false"
+ android:clipToPadding="false"
+ android:paddingBottom="@dimen/history_divider_padding"
+ android:visibility="invisible"
+ app:layoutManager="LinearLayoutManager"
+ app:reverseLayout="true" />
+
+</LinearLayout>
diff --git a/res/layout/history_item.xml b/res/layout/history_item.xml
new file mode 100644
index 0000000..cf8b6c0
--- /dev/null
+++ b/res/layout/history_item.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="@dimen/history_divider_padding"
+ android:clipChildren="false"
+ android:clipToPadding="false"
+ android:importantForAccessibility="no"
+ android:orientation="vertical">
+
+ <View
+ android:id="@+id/history_divider"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/history_divider_padding"
+ android:layout_marginBottom="@dimen/history_divider_padding"
+ android:background="?android:attr/listDivider"
+ android:importantForAccessibility="no" />
+
+ <TextView
+ android:id="@+id/history_date"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:fontFamily="sans-serif-medium"
+ android:paddingStart="@dimen/result_padding_start"
+ android:paddingEnd="@dimen/result_padding_end"
+ android:text="@string/title_current_expression"
+ android:textColor="?android:attr/colorAccent"
+ android:textSize="14dp" />
+
+ <com.android.calculator2.CalculatorScrollView
+ android:id="@+id/history_formula_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:overScrollMode="never"
+ android:scrollbars="none">
+
+ <com.android.calculator2.AlignedTextView
+ android:id="@+id/history_formula"
+ style="@style/HistoryItemTextStyle"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:ellipsize="none"
+ android:textColor="@color/display_formula_text_color" />
+
+ </com.android.calculator2.CalculatorScrollView>
+
+ <com.android.calculator2.CalculatorResult
+ android:id="@+id/history_result"
+ style="@style/HistoryItemTextStyle"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:bufferType="spannable"
+ android:maxLines="1"
+ android:textColor="@color/display_result_text_color" />
+
+</LinearLayout>
diff --git a/res/layout/pad_advanced_3x5.xml b/res/layout/pad_advanced_3x5.xml
index e303133..ece7003 100644
--- a/res/layout/pad_advanced_3x5.xml
+++ b/res/layout/pad_advanced_3x5.xml
@@ -15,193 +15,194 @@
limitations under the License.
-->
-<GridLayout
+<android.support.v7.widget.GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/pad_advanced"
style="@style/PadLayoutStyle.Advanced"
- android:rowCount="5"
- android:columnCount="3"
- android:background="@color/pad_advanced_background_color">
+ android:background="@color/pad_advanced_background_color"
+ app:rowCount="5"
+ app:columnCount="3">
<Button
android:id="@+id/toggle_inv"
style="@style/PadButtonStyle.Advanced.Text"
- android:layout_row="0"
- android:layout_column="0"
android:background="@drawable/pad_button_inverse_background"
android:contentDescription="@string/desc_inv_off"
- android:text="@string/inv" />
+ android:text="@string/inv"
+ app:layout_row="0"
+ app:layout_column="0" />
<Button
android:id="@+id/toggle_mode"
style="@style/PadButtonStyle.Advanced.Text"
- android:layout_row="0"
- android:layout_column="1"
android:contentDescription="@string/desc_switch_deg"
- android:text="@string/mode_deg" />
+ android:text="@string/mode_deg"
+ app:layout_row="0"
+ app:layout_column="1" />
<Button
android:id="@+id/op_pct"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="0"
- android:layout_column="2"
android:contentDescription="@string/desc_op_pct"
- android:text="@string/op_pct" />
+ android:text="@string/op_pct"
+ app:layout_row="0"
+ app:layout_column="2" />
<Button
android:id="@+id/fun_sin"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="0"
android:contentDescription="@string/desc_fun_sin"
- android:text="@string/fun_sin" />
+ android:text="@string/fun_sin"
+ app:layout_row="1"
+ app:layout_column="0" />
<Button
android:id="@+id/fun_arcsin"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="0"
android:contentDescription="@string/desc_fun_arcsin"
android:fontFamily="sans-serif-medium"
android:text="@string/fun_arcsin"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="1"
+ app:layout_column="0" />
<Button
android:id="@+id/fun_cos"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="1"
android:contentDescription="@string/desc_fun_cos"
- android:text="@string/fun_cos" />
+ android:text="@string/fun_cos"
+ app:layout_row="1"
+ app:layout_column="1" />
<Button
android:id="@+id/fun_arccos"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="1"
android:contentDescription="@string/desc_fun_arccos"
android:fontFamily="sans-serif-medium"
android:text="@string/fun_arccos"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="1"
+ app:layout_column="1" />
<Button
android:id="@+id/fun_tan"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="2"
android:contentDescription="@string/desc_fun_tan"
- android:text="@string/fun_tan" />
+ android:text="@string/fun_tan"
+ app:layout_row="1"
+ app:layout_column="2" />
<Button
android:id="@+id/fun_arctan"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="2"
android:contentDescription="@string/desc_fun_arctan"
android:fontFamily="sans-serif-medium"
android:text="@string/fun_arctan"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="1"
+ app:layout_column="2" />
<Button
android:id="@+id/fun_ln"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="2"
- android:layout_column="0"
android:contentDescription="@string/desc_fun_ln"
- android:text="@string/fun_ln" />
+ android:text="@string/fun_ln"
+ app:layout_row="2"
+ app:layout_column="0" />
<Button
android:id="@+id/fun_exp"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="2"
- android:layout_column="0"
android:contentDescription="@string/desc_fun_exp"
android:fontFamily="sans-serif-medium"
android:text="@string/fun_exp"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="2"
+ app:layout_column="0" />
<Button
android:id="@+id/fun_log"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="2"
- android:layout_column="1"
android:contentDescription="@string/desc_fun_log"
- android:text="@string/fun_log" />
+ android:text="@string/fun_log"
+ app:layout_row="2"
+ app:layout_column="1" />
<Button
android:id="@+id/fun_10pow"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="2"
- android:layout_column="1"
android:contentDescription="@string/desc_fun_10pow"
android:fontFamily="sans-serif-medium"
android:text="@string/fun_10pow"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="2"
+ app:layout_column="1" />
<Button
android:id="@+id/op_fact"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="2"
- android:layout_column="2"
android:contentDescription="@string/desc_op_fact"
- android:text="@string/op_fact" />
+ android:text="@string/op_fact"
+ app:layout_row="2"
+ app:layout_column="2" />
<Button
android:id="@+id/const_pi"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="3"
- android:layout_column="0"
android:contentDescription="@string/desc_const_pi"
- android:text="@string/const_pi" />
+ android:text="@string/const_pi"
+ app:layout_row="3"
+ app:layout_column="0" />
<Button
android:id="@+id/const_e"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="3"
- android:layout_column="1"
android:contentDescription="@string/desc_const_e"
- android:text="@string/const_e" />
+ android:text="@string/const_e"
+ app:layout_row="3"
+ app:layout_column="1" />
<Button
android:id="@+id/op_pow"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="3"
- android:layout_column="2"
android:contentDescription="@string/desc_op_pow"
- android:text="@string/op_pow" />
+ android:text="@string/op_pow"
+ app:layout_row="3"
+ app:layout_column="2" />
<Button
android:id="@+id/lparen"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="4"
- android:layout_column="0"
android:contentDescription="@string/desc_lparen"
- android:text="@string/lparen" />
+ android:text="@string/lparen"
+ app:layout_row="4"
+ app:layout_column="0" />
<Button
android:id="@+id/rparen"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="4"
- android:layout_column="1"
android:contentDescription="@string/desc_rparen"
- android:text="@string/rparen" />
+ android:text="@string/rparen"
+ app:layout_row="4"
+ app:layout_column="1" />
<Button
android:id="@+id/op_sqrt"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="4"
- android:layout_column="2"
android:contentDescription="@string/desc_op_sqrt"
- android:text="@string/op_sqrt" />
+ android:text="@string/op_sqrt"
+ app:layout_row="4"
+ app:layout_column="2" />
<Button
android:id="@+id/op_sqr"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="4"
- android:layout_column="2"
android:contentDescription="@string/desc_op_sqr"
android:fontFamily="sans-serif-medium"
android:text="@string/op_sqr"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="4"
+ app:layout_column="2" />
-</GridLayout>
+</android.support.v7.widget.GridLayout>
diff --git a/res/layout/pad_advanced_4x4.xml b/res/layout/pad_advanced_4x4.xml
index ddbee47..70a520e 100644
--- a/res/layout/pad_advanced_4x4.xml
+++ b/res/layout/pad_advanced_4x4.xml
@@ -15,193 +15,194 @@
limitations under the License.
-->
-<GridLayout
+<android.support.v7.widget.GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/pad_advanced"
style="@style/PadLayoutStyle.Advanced"
- android:rowCount="4"
- android:columnCount="4"
- android:background="@color/pad_advanced_background_color">
+ android:background="@color/pad_advanced_background_color"
+ app:rowCount="4"
+ app:columnCount="4">
<Button
android:id="@+id/toggle_inv"
style="@style/PadButtonStyle.Advanced.Text"
- android:layout_row="0"
- android:layout_column="0"
android:background="@drawable/pad_button_inverse_background"
android:contentDescription="@string/desc_inv_off"
- android:text="@string/inv" />
+ android:text="@string/inv"
+ app:layout_row="0"
+ app:layout_column="0" />
<Button
android:id="@+id/toggle_mode"
style="@style/PadButtonStyle.Advanced.Text"
- android:layout_row="0"
- android:layout_column="1"
android:contentDescription="@string/desc_switch_deg"
- android:text="@string/mode_deg" />
+ android:text="@string/mode_deg"
+ app:layout_row="0"
+ app:layout_column="1" />
<Button
android:id="@+id/op_pct"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="0"
- android:layout_column="2"
android:contentDescription="@string/desc_op_pct"
- android:text="@string/op_pct" />
+ android:text="@string/op_pct"
+ app:layout_row="0"
+ app:layout_column="2" />
<Button
android:id="@+id/fun_sin"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="0"
android:contentDescription="@string/desc_fun_sin"
- android:text="@string/fun_sin" />
+ android:text="@string/fun_sin"
+ app:layout_row="1"
+ app:layout_column="0" />
<Button
android:id="@+id/fun_arcsin"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="0"
android:contentDescription="@string/desc_fun_arcsin"
android:fontFamily="sans-serif-medium"
android:text="@string/fun_arcsin"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="1"
+ app:layout_column="0" />
<Button
android:id="@+id/fun_cos"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="1"
android:contentDescription="@string/desc_fun_cos"
- android:text="@string/fun_cos" />
+ android:text="@string/fun_cos"
+ app:layout_row="1"
+ app:layout_column="1" />
<Button
android:id="@+id/fun_arccos"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="1"
android:contentDescription="@string/desc_fun_arccos"
android:fontFamily="sans-serif-medium"
android:text="@string/fun_arccos"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="1"
+ app:layout_column="1" />
<Button
android:id="@+id/fun_tan"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="2"
android:contentDescription="@string/desc_fun_tan"
- android:text="@string/fun_tan" />
+ android:text="@string/fun_tan"
+ app:layout_row="1"
+ app:layout_column="2" />
<Button
android:id="@+id/fun_arctan"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="2"
android:contentDescription="@string/desc_fun_arctan"
android:fontFamily="sans-serif-medium"
android:text="@string/fun_arctan"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="1"
+ app:layout_column="2" />
<Button
android:id="@+id/const_pi"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="3"
android:contentDescription="@string/desc_const_pi"
- android:text="@string/const_pi" />
+ android:text="@string/const_pi"
+ app:layout_row="1"
+ app:layout_column="3" />
<Button
android:id="@+id/fun_ln"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="2"
- android:layout_column="0"
android:contentDescription="@string/desc_fun_ln"
- android:text="@string/fun_ln" />
+ android:text="@string/fun_ln"
+ app:layout_row="2"
+ app:layout_column="0" />
<Button
android:id="@+id/fun_exp"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="2"
- android:layout_column="0"
android:contentDescription="@string/desc_fun_exp"
android:fontFamily="sans-serif-medium"
android:text="@string/fun_exp"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="2"
+ app:layout_column="0" />
<Button
android:id="@+id/fun_log"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="2"
- android:layout_column="1"
android:contentDescription="@string/desc_fun_log"
- android:text="@string/fun_log" />
+ android:text="@string/fun_log"
+ app:layout_row="2"
+ app:layout_column="1" />
<Button
android:id="@+id/fun_10pow"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="2"
- android:layout_column="1"
android:contentDescription="@string/desc_fun_10pow"
android:fontFamily="sans-serif-medium"
android:text="@string/fun_10pow"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="2"
+ app:layout_column="1" />
<Button
android:id="@+id/op_fact"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="2"
- android:layout_column="2"
android:contentDescription="@string/desc_op_fact"
- android:text="@string/op_fact" />
+ android:text="@string/op_fact"
+ app:layout_row="2"
+ app:layout_column="2" />
<Button
android:id="@+id/const_e"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="2"
- android:layout_column="3"
android:contentDescription="@string/desc_const_e"
- android:text="@string/const_e" />
+ android:text="@string/const_e"
+ app:layout_row="2"
+ app:layout_column="3" />
<Button
android:id="@+id/lparen"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="3"
- android:layout_column="0"
android:contentDescription="@string/desc_lparen"
- android:text="@string/lparen" />
+ android:text="@string/lparen"
+ app:layout_row="3"
+ app:layout_column="0" />
<Button
android:id="@+id/rparen"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="3"
- android:layout_column="1"
android:contentDescription="@string/desc_rparen"
- android:text="@string/rparen" />
+ android:text="@string/rparen"
+ app:layout_row="3"
+ app:layout_column="1" />
<Button
android:id="@+id/op_sqrt"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="3"
- android:layout_column="2"
android:contentDescription="@string/desc_op_sqrt"
- android:text="@string/op_sqrt" />
+ android:text="@string/op_sqrt"
+ app:layout_row="3"
+ app:layout_column="2" />
<Button
android:id="@+id/op_sqr"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="3"
- android:layout_column="2"
android:contentDescription="@string/desc_op_sqr"
android:fontFamily="sans-serif-medium"
android:text="@string/op_sqr"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="3"
+ app:layout_column="2" />
<Button
android:id="@+id/op_pow"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="3"
- android:layout_column="3"
android:contentDescription="@string/desc_op_pow"
- android:text="@string/op_pow" />
+ android:text="@string/op_pow"
+ app:layout_row="3"
+ app:layout_column="3" />
-</GridLayout> \ No newline at end of file
+</android.support.v7.widget.GridLayout>
diff --git a/res/layout/pad_advanced_5x3.xml b/res/layout/pad_advanced_5x3.xml
index b8de7fd..95a0fc1 100644
--- a/res/layout/pad_advanced_5x3.xml
+++ b/res/layout/pad_advanced_5x3.xml
@@ -15,193 +15,194 @@
limitations under the License.
-->
-<GridLayout
+<android.support.v7.widget.GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/pad_advanced"
style="@style/PadLayoutStyle.Advanced"
- android:rowCount="3"
- android:columnCount="5"
- android:background="@color/pad_advanced_background_color">
+ android:background="@color/pad_advanced_background_color"
+ app:rowCount="3"
+ app:columnCount="5">
<Button
android:id="@+id/toggle_inv"
style="@style/PadButtonStyle.Advanced.Text"
- android:layout_row="0"
- android:layout_column="0"
android:background="@drawable/pad_button_inverse_background"
android:contentDescription="@string/desc_inv_off"
- android:text="@string/inv" />
+ android:text="@string/inv"
+ app:layout_row="0"
+ app:layout_column="0" />
<Button
android:id="@+id/toggle_mode"
style="@style/PadButtonStyle.Advanced.Text"
- android:layout_row="0"
- android:layout_column="1"
android:contentDescription="@string/desc_switch_deg"
- android:text="@string/mode_deg" />
+ android:text="@string/mode_deg"
+ app:layout_row="0"
+ app:layout_column="1" />
<Button
android:id="@+id/fun_sin"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="0"
- android:layout_column="2"
android:contentDescription="@string/desc_fun_sin"
- android:text="@string/fun_sin" />
+ android:text="@string/fun_sin"
+ app:layout_row="0"
+ app:layout_column="2" />
<Button
android:id="@+id/fun_arcsin"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="0"
- android:layout_column="2"
android:contentDescription="@string/desc_fun_arcsin"
android:fontFamily="sans-serif-medium"
android:text="@string/fun_arcsin"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="0"
+ app:layout_column="2" />
<Button
android:id="@+id/fun_cos"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="0"
- android:layout_column="3"
android:contentDescription="@string/desc_fun_cos"
- android:text="@string/fun_cos" />
+ android:text="@string/fun_cos"
+ app:layout_row="0"
+ app:layout_column="3" />
<Button
android:id="@+id/fun_arccos"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="0"
- android:layout_column="3"
android:contentDescription="@string/desc_fun_arccos"
android:fontFamily="sans-serif-medium"
android:text="@string/fun_arccos"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="0"
+ app:layout_column="3" />
<Button
android:id="@+id/fun_tan"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="0"
- android:layout_column="4"
android:contentDescription="@string/desc_fun_tan"
- android:text="@string/fun_tan" />
+ android:text="@string/fun_tan"
+ app:layout_row="0"
+ app:layout_column="4" />
<Button
android:id="@+id/fun_arctan"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="0"
- android:layout_column="4"
android:contentDescription="@string/desc_fun_arctan"
android:fontFamily="sans-serif-medium"
android:text="@string/fun_arctan"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="0"
+ app:layout_column="4" />
<Button
android:id="@+id/op_pct"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="0"
android:contentDescription="@string/desc_op_pct"
- android:text="@string/op_pct" />
+ android:text="@string/op_pct"
+ app:layout_row="1"
+ app:layout_column="0" />
<Button
android:id="@+id/fun_ln"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="1"
android:contentDescription="@string/desc_fun_ln"
- android:text="@string/fun_ln" />
+ android:text="@string/fun_ln"
+ app:layout_row="1"
+ app:layout_column="1" />
<Button
android:id="@+id/fun_exp"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="1"
android:contentDescription="@string/desc_fun_exp"
android:fontFamily="sans-serif-medium"
android:text="@string/fun_exp"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="1"
+ app:layout_column="1" />
<Button
android:id="@+id/fun_log"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="2"
android:contentDescription="@string/desc_fun_log"
- android:text="@string/fun_log" />
+ android:text="@string/fun_log"
+ app:layout_row="1"
+ app:layout_column="2" />
<Button
android:id="@+id/fun_10pow"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="2"
android:contentDescription="@string/desc_fun_10pow"
android:fontFamily="sans-serif-medium"
android:text="@string/fun_10pow"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="1"
+ app:layout_column="2" />
<Button
android:id="@+id/op_fact"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="3"
android:contentDescription="@string/desc_op_fact"
- android:text="@string/op_fact" />
+ android:text="@string/op_fact"
+ app:layout_row="1"
+ app:layout_column="3" />
<Button
android:id="@+id/op_pow"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="1"
- android:layout_column="4"
android:contentDescription="@string/desc_op_pow"
- android:text="@string/op_pow" />
+ android:text="@string/op_pow"
+ app:layout_row="1"
+ app:layout_column="4" />
<Button
android:id="@+id/const_pi"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="2"
- android:layout_column="0"
android:contentDescription="@string/desc_const_pi"
- android:text="@string/const_pi" />
+ android:text="@string/const_pi"
+ app:layout_row="2"
+ app:layout_column="0" />
<Button
android:id="@+id/const_e"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="2"
- android:layout_column="1"
android:contentDescription="@string/desc_const_e"
- android:text="@string/const_e" />
+ android:text="@string/const_e"
+ app:layout_row="2"
+ app:layout_column="1" />
<Button
android:id="@+id/lparen"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="2"
- android:layout_column="2"
android:contentDescription="@string/desc_lparen"
- android:text="@string/lparen" />
+ android:text="@string/lparen"
+ app:layout_row="2"
+ app:layout_column="2" />
<Button
android:id="@+id/rparen"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="2"
- android:layout_column="3"
android:contentDescription="@string/desc_rparen"
- android:text="@string/rparen" />
+ android:text="@string/rparen"
+ app:layout_row="2"
+ app:layout_column="3" />
<Button
android:id="@+id/op_sqrt"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="2"
- android:layout_column="4"
android:contentDescription="@string/desc_op_sqrt"
- android:text="@string/op_sqrt" />
+ android:text="@string/op_sqrt"
+ app:layout_row="2"
+ app:layout_column="4" />
<Button
android:id="@+id/op_sqr"
style="@style/PadButtonStyle.Advanced"
- android:layout_row="2"
- android:layout_column="4"
android:contentDescription="@string/desc_op_sqr"
android:fontFamily="sans-serif-medium"
android:text="@string/op_sqr"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="2"
+ app:layout_column="4" />
-</GridLayout>
+</android.support.v7.widget.GridLayout>
diff --git a/res/layout/pad_numeric.xml b/res/layout/pad_numeric.xml
index 34e9dbc..2f301e8 100644
--- a/res/layout/pad_numeric.xml
+++ b/res/layout/pad_numeric.xml
@@ -15,98 +15,98 @@
limitations under the License.
-->
-<GridLayout
+<android.support.v7.widget.GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/pad_numeric"
style="@style/PadLayoutStyle.Numeric"
- android:rowCount="4"
- android:columnCount="3"
- android:background="@color/pad_numeric_background_color">
+ android:background="@color/pad_numeric_background_color"
+ app:rowCount="4"
+ app:columnCount="3">
<Button
android:id="@+id/digit_7"
style="@style/PadButtonStyle.Numeric"
- android:layout_row="0"
- android:layout_column="0"
- android:text="@string/digit_7" />
+ android:text="@string/digit_7"
+ app:layout_row="0"
+ app:layout_column="0" />
<Button
android:id="@+id/digit_8"
style="@style/PadButtonStyle.Numeric"
- android:layout_row="0"
- android:layout_column="1"
- android:text="@string/digit_8" />
+ android:text="@string/digit_8"
+ app:layout_row="0"
+ app:layout_column="1" />
<Button
android:id="@+id/digit_9"
style="@style/PadButtonStyle.Numeric"
- android:layout_row="0"
- android:layout_column="2"
- android:text="@string/digit_9" />
+ android:text="@string/digit_9"
+ app:layout_row="0"
+ app:layout_column="2" />
<Button
android:id="@+id/digit_4"
style="@style/PadButtonStyle.Numeric"
- android:layout_row="1"
- android:layout_column="0"
- android:text="@string/digit_4" />
+ android:text="@string/digit_4"
+ app:layout_row="1"
+ app:layout_column="0" />
<Button
android:id="@+id/digit_5"
style="@style/PadButtonStyle.Numeric"
- android:layout_row="1"
- android:layout_column="1"
- android:text="@string/digit_5" />
+ android:text="@string/digit_5"
+ app:layout_row="1"
+ app:layout_column="1" />
<Button
android:id="@+id/digit_6"
style="@style/PadButtonStyle.Numeric"
- android:layout_row="1"
- android:layout_column="2"
- android:text="@string/digit_6" />
+ android:text="@string/digit_6"
+ app:layout_row="1"
+ app:layout_column="2" />
<Button
android:id="@+id/digit_1"
style="@style/PadButtonStyle.Numeric"
- android:layout_row="2"
- android:layout_column="0"
- android:text="@string/digit_1" />
+ android:text="@string/digit_1"
+ app:layout_row="2"
+ app:layout_column="0" />
<Button
android:id="@+id/digit_2"
style="@style/PadButtonStyle.Numeric"
- android:layout_row="2"
- android:layout_column="1"
- android:text="@string/digit_2" />
+ android:text="@string/digit_2"
+ app:layout_row="2"
+ app:layout_column="1" />
<Button
android:id="@+id/digit_3"
style="@style/PadButtonStyle.Numeric"
- android:layout_row="2"
- android:layout_column="2"
- android:text="@string/digit_3" />
+ android:text="@string/digit_3"
+ app:layout_row="2"
+ app:layout_column="2" />
<Button
android:id="@+id/dec_point"
style="@style/PadButtonStyle.Numeric"
- android:layout_row="3"
- android:layout_column="0"
android:contentDescription="@string/desc_dec_point"
- android:text="@string/dec_point" />
+ app:layout_row="3"
+ app:layout_column="0" />
<Button
android:id="@+id/digit_0"
style="@style/PadButtonStyle.Numeric"
- android:layout_row="3"
- android:layout_column="1"
- android:text="@string/digit_0" />
+ android:text="@string/digit_0"
+ app:layout_row="3"
+ app:layout_column="1" />
<Button
android:id="@+id/eq"
style="@style/PadButtonStyle.Numeric.Equals"
- android:layout_row="3"
- android:layout_column="2"
android:contentDescription="@string/desc_eq"
- android:text="@string/eq" />
+ android:text="@string/eq"
+ app:layout_row="3"
+ app:layout_column="2" />
-</GridLayout>
+</android.support.v7.widget.GridLayout>
diff --git a/res/layout/pad_operator_one_col.xml b/res/layout/pad_operator_one_col.xml
index 1323b2c..3a6473a 100644
--- a/res/layout/pad_operator_one_col.xml
+++ b/res/layout/pad_operator_one_col.xml
@@ -15,62 +15,63 @@
limitations under the License.
-->
-<GridLayout
+<android.support.v7.widget.GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/pad_operator"
style="@style/PadLayoutStyle.Operator"
- android:rowCount="5"
- android:columnCount="1"
- android:background="@color/pad_operator_background_color">
+ android:background="@color/pad_operator_background_color"
+ app:rowCount="5"
+ app:columnCount="1">
<Button
android:id="@+id/del"
style="@style/PadButtonStyle.Operator.Text"
- android:layout_row="0"
- android:layout_column="0"
android:contentDescription="@string/desc_del"
- android:text="@string/del" />
+ android:text="@string/del"
+ app:layout_row="0"
+ app:layout_column="0" />
<Button
android:id="@+id/clr"
style="@style/PadButtonStyle.Operator.Text"
- android:layout_row="0"
- android:layout_column="0"
android:contentDescription="@string/desc_clr"
android:text="@string/clr"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="0"
+ app:layout_column="0" />
<Button
android:id="@+id/op_div"
style="@style/PadButtonStyle.Operator"
- android:layout_row="1"
- android:layout_column="0"
android:contentDescription="@string/desc_op_div"
- android:text="@string/op_div" />
+ android:text="@string/op_div"
+ app:layout_row="1"
+ app:layout_column="0" />
<Button
android:id="@+id/op_mul"
style="@style/PadButtonStyle.Operator"
- android:layout_row="2"
- android:layout_column="0"
android:contentDescription="@string/desc_op_mul"
- android:text="@string/op_mul" />
+ android:text="@string/op_mul"
+ app:layout_row="2"
+ app:layout_column="0" />
<Button
android:id="@+id/op_sub"
style="@style/PadButtonStyle.Operator"
- android:layout_row="3"
- android:layout_column="0"
android:contentDescription="@string/desc_op_sub"
- android:text="@string/op_sub" />
+ android:text="@string/op_sub"
+ app:layout_row="3"
+ app:layout_column="0" />
<Button
android:id="@+id/op_add"
style="@style/PadButtonStyle.Operator"
- android:layout_row="4"
- android:layout_column="0"
android:contentDescription="@string/desc_op_add"
- android:text="@string/op_add" />
+ android:text="@string/op_add"
+ app:layout_row="4"
+ app:layout_column="0" />
-</GridLayout>
+</android.support.v7.widget.GridLayout>
diff --git a/res/layout/pad_operator_two_col.xml b/res/layout/pad_operator_two_col.xml
index 0d559d1..e056ba5 100644
--- a/res/layout/pad_operator_two_col.xml
+++ b/res/layout/pad_operator_two_col.xml
@@ -15,69 +15,70 @@
limitations under the License.
-->
-<GridLayout
+<android.support.v7.widget.GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/pad_operator"
style="@style/PadLayoutStyle.Operator"
- android:rowCount="4"
- android:columnCount="2"
- android:background="@color/pad_operator_background_color">
+ android:background="@color/pad_operator_background_color"
+ app:rowCount="4"
+ app:columnCount="2">
<Button
android:id="@+id/op_div"
style="@style/PadButtonStyle.Operator"
- android:layout_row="0"
- android:layout_column="0"
android:contentDescription="@string/desc_op_div"
- android:text="@string/op_div" />
+ android:text="@string/op_div"
+ app:layout_row="0"
+ app:layout_column="0" />
<Button
android:id="@+id/del"
style="@style/PadButtonStyle.Operator.Text"
- android:layout_row="0"
- android:layout_column="1"
android:contentDescription="@string/desc_del"
- android:text="@string/del" />
+ android:text="@string/del"
+ app:layout_row="0"
+ app:layout_column="1" />
<Button
android:id="@+id/clr"
style="@style/PadButtonStyle.Operator.Text"
- android:layout_row="0"
- android:layout_column="1"
android:contentDescription="@string/desc_clr"
android:text="@string/clr"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:layout_row="0"
+ app:layout_column="1" />
<Button
android:id="@+id/op_mul"
style="@style/PadButtonStyle.Operator"
- android:layout_row="1"
- android:layout_column="0"
android:contentDescription="@string/op_mul"
- android:text="@string/op_mul" />
+ android:text="@string/op_mul"
+ app:layout_row="1"
+ app:layout_column="0" />
<Button
android:id="@+id/op_sub"
style="@style/PadButtonStyle.Operator"
- android:layout_row="2"
- android:layout_column="0"
android:contentDescription="@string/desc_op_sub"
- android:text="@string/op_sub" />
+ android:text="@string/op_sub"
+ app:layout_row="2"
+ app:layout_column="0" />
<Button
android:id="@+id/op_add"
style="@style/PadButtonStyle.Operator"
- android:layout_row="3"
- android:layout_column="0"
android:contentDescription="@string/desc_op_add"
- android:text="@string/op_add" />
+ android:text="@string/op_add"
+ app:layout_row="3"
+ app:layout_column="0" />
<Button
android:id="@+id/eq"
style="@style/PadButtonStyle.Operator"
- android:layout_row="3"
- android:layout_column="1"
android:contentDescription="@string/desc_eq"
- android:text="@string/eq" />
+ android:text="@string/eq"
+ app:layout_row="3"
+ app:layout_column="1" />
-</GridLayout>
+</android.support.v7.widget.GridLayout>
diff --git a/res/menu/activity_calculator.xml b/res/menu/activity_calculator.xml
index 8d086d1..d0c5659 100644
--- a/res/menu/activity_calculator.xml
+++ b/res/menu/activity_calculator.xml
@@ -17,6 +17,10 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:id="@+id/menu_history"
+ android:title="@string/menu_history" />
+
<item android:id="@+id/menu_leading"
android:title="@string/menu_leading" />
diff --git a/res/menu/fragment_history.xml b/res/menu/fragment_history.xml
new file mode 100644
index 0000000..8c9f1d6
--- /dev/null
+++ b/res/menu/fragment_history.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item
+ android:id="@+id/menu_clear_history"
+ android:title="@string/menu_clear_history" />
+
+</menu> \ No newline at end of file
diff --git a/res/menu/paste.xml b/res/menu/menu_formula.xml
index 964be0d..8882c8a 100644
--- a/res/menu/paste.xml
+++ b/res/menu/menu_formula.xml
@@ -19,7 +19,10 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@+id/memory_recall"
+ android:title="@string/memory_recall"/>
+
<item android:id="@+id/menu_paste"
- android:title="@android:string/paste"/>
+ android:title="@android:string/paste"/>
</menu>
diff --git a/res/menu/copy.xml b/res/menu/menu_result.xml
index 5897f88..15e76cd 100644
--- a/res/menu/copy.xml
+++ b/res/menu/menu_result.xml
@@ -19,7 +19,20 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:id="@+id/menu_copy"
- android:title="@android:string/copy"/>
+ <item
+ android:id="@+id/memory_store"
+ android:title="@string/memory_store" />
-</menu>
+ <item
+ android:id="@+id/memory_add"
+ android:title="@string/memory_add" />
+
+ <item
+ android:id="@+id/memory_subtract"
+ android:title="@string/memory_subtract" />
+
+ <item
+ android:id="@+id/menu_copy"
+ android:title="@android:string/copy" />
+
+</menu> \ No newline at end of file
diff --git a/res/values-w230dp-h220dp/styles.xml b/res/values-w230dp-h220dp/styles.xml
deleted file mode 100644
index 88a52ce..0000000
--- a/res/values-w230dp-h220dp/styles.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2016 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
-
- <style name="DisplayTextStyle.Formula">
- <item name="android:paddingTop">0dip</item>
- <item name="android:paddingBottom">0dip</item>
- <item name="android:paddingStart">16dip</item>
- <item name="android:paddingEnd">16dip</item>
- <item name="android:gravity">bottom</item>
- <item name="minTextSize">28dip</item>
- <item name="maxTextSize">28dip</item>
- <item name="stepTextSize">8dip</item>
- </style>
-
- <style name="DisplayTextStyle.Result">
- <item name="android:paddingTop">0dip</item>
- <item name="android:paddingBottom">0dip</item>
- <item name="android:paddingStart">16dip</item>
- <item name="android:paddingEnd">16dip</item>
- <item name="android:gravity">bottom</item>
- <item name="android:textSize">28dip</item>
- </style>
-
- <style name="PadButtonStyle.Advanced">
- <item name="android:background">@drawable/pad_button_advanced_background</item>
- <item name="android:textColor">@color/pad_button_advanced_text_color</item>
- <item name="android:textSize">14dip</item>
- </style>
-
- <style name="PadButtonStyle.Advanced.Text">
- <item name="android:textAllCaps">true</item>
- <item name="android:textSize">12dip</item>
- </style>
-
- <style name="PadButtonStyle.Numeric">
- <item name="android:textSize">16dip</item>
- </style>
-
- <style name="PadButtonStyle.Numeric.Equals">
- <item name="android:visibility">visible</item>
- </style>
-
- <style name="PadButtonStyle.Operator">
- <item name="android:textSize">14dip</item>
- </style>
-
- <style name="PadButtonStyle.Operator.Text">
- <item name="android:textAllCaps">true</item>
- <item name="android:textSize">12dip</item>
- </style>
-
- <style name="PadLayoutStyle.Advanced">
- <item name="android:elevation">4dip</item>
- <item name="android:paddingTop">2dip</item>
- <item name="android:paddingBottom">8dip</item>
- <item name="android:paddingStart">18dip</item>
- <item name="android:paddingEnd">18dip</item>
- </style>
-
- <style name="PadLayoutStyle.Numeric">
- <item name="android:layout_width">0dip</item>
- <item name="android:layout_weight">7</item>
- <item name="android:paddingTop">2dip</item>
- <item name="android:paddingBottom">8dip</item>
- <item name="android:paddingStart">8dip</item>
- <item name="android:paddingEnd">8dip</item>
- </style>
-
- <style name="PadLayoutStyle.Operator">
- <item name="android:layout_width">0dip</item>
- <item name="android:layout_weight">3</item>
- <item name="android:paddingTop">2dip</item>
- <item name="android:paddingBottom">8dip</item>
- <item name="android:paddingStart">4dip</item>
- <item name="android:paddingEnd">28dip</item>
- </style>
-
-</resources>
diff --git a/res/values-w230dp-h275dp/dimens.xml b/res/values-w230dp-h275dp/dimens.xml
new file mode 100644
index 0000000..7f8bf5e
--- /dev/null
+++ b/res/values-w230dp-h275dp/dimens.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources>
+ <!-- Dimens for display formula. -->
+ <dimen name="formula_padding_top">0dip</dimen>
+ <dimen name="formula_padding_bottom">8dip</dimen>
+ <dimen name="formula_padding_start">16dip</dimen>
+ <dimen name="formula_padding_end">16dip</dimen>
+ <dimen name="formula_min_textsize">28dip</dimen>
+ <dimen name="formula_max_textsize">28dip</dimen>
+ <dimen name="formula_step_textsize">8dip</dimen>
+
+ <!-- Dimens for display result. -->
+ <dimen name="result_padding_top">0dip</dimen>
+ <dimen name="result_padding_bottom">8dip</dimen>
+ <dimen name="result_padding_start">16dip</dimen>
+ <dimen name="result_padding_end">16dip</dimen>
+ <dimen name="result_textsize">28dip</dimen>
+</resources>
diff --git a/res/values-w230dp-h275dp/styles.xml b/res/values-w230dp-h275dp/styles.xml
index 2f715a3..bbb38be 100644
--- a/res/values-w230dp-h275dp/styles.xml
+++ b/res/values-w230dp-h275dp/styles.xml
@@ -17,26 +17,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="DisplayTextStyle.Formula">
- <item name="android:paddingTop">0dip</item>
- <item name="android:paddingBottom">0dip</item>
- <item name="android:paddingStart">16dip</item>
- <item name="android:paddingEnd">16dip</item>
- <item name="android:gravity">bottom</item>
- <item name="minTextSize">28dip</item>
- <item name="maxTextSize">28dip</item>
- <item name="stepTextSize">8dip</item>
- </style>
-
- <style name="DisplayTextStyle.Result">
- <item name="android:paddingTop">0dip</item>
- <item name="android:paddingBottom">0dip</item>
- <item name="android:paddingStart">16dip</item>
- <item name="android:paddingEnd">16dip</item>
- <item name="android:gravity">bottom</item>
- <item name="android:textSize">28dip</item>
- </style>
-
<style name="PadButtonStyle.Advanced">
<item name="android:background">@drawable/pad_button_advanced_background</item>
<item name="android:textColor">@color/pad_button_advanced_text_color</item>
diff --git a/res/values-w230dp-h375dp/dimens.xml b/res/values-w230dp-h375dp/dimens.xml
new file mode 100644
index 0000000..a747231
--- /dev/null
+++ b/res/values-w230dp-h375dp/dimens.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources>
+ <!-- Dimens for display formula. -->
+ <dimen name="formula_padding_top">2dip</dimen>
+ <dimen name="formula_padding_bottom">10dip</dimen>
+ <dimen name="formula_padding_start">16dip</dimen>
+ <dimen name="formula_padding_end">16dip</dimen>
+ <dimen name="formula_min_textsize">32dip</dimen>
+ <dimen name="formula_max_textsize">32dip</dimen>
+ <dimen name="formula_step_textsize">8dip</dimen>
+
+ <!-- Dimens for display result. -->
+ <dimen name="result_padding_top">12dip</dimen>
+ <dimen name="result_padding_bottom">18dip</dimen>
+ <dimen name="result_padding_start">16dip</dimen>
+ <dimen name="result_padding_end">16dip</dimen>
+ <dimen name="result_textsize">32dip</dimen>
+</resources> \ No newline at end of file
diff --git a/res/values-w230dp-h375dp/styles.xml b/res/values-w230dp-h375dp/styles.xml
index 4aa32d8..c72fd3f 100644
--- a/res/values-w230dp-h375dp/styles.xml
+++ b/res/values-w230dp-h375dp/styles.xml
@@ -17,24 +17,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="DisplayTextStyle.Formula">
- <item name="android:paddingTop">2dip</item>
- <item name="android:paddingBottom">10dip</item>
- <item name="android:paddingStart">16dip</item>
- <item name="android:paddingEnd">16dip</item>
- <item name="minTextSize">32dip</item>
- <item name="maxTextSize">32dip</item>
- <item name="stepTextSize">8dip</item>
- </style>
-
- <style name="DisplayTextStyle.Result">
- <item name="android:paddingTop">12dip</item>
- <item name="android:paddingBottom">18dip</item>
- <item name="android:paddingStart">16dip</item>
- <item name="android:paddingEnd">16dip</item>
- <item name="android:textSize">32dip</item>
- </style>
-
<style name="PadButtonStyle.Advanced">
<item name="android:background">@drawable/pad_button_advanced_background</item>
<item name="android:textColor">@color/pad_button_advanced_text_color</item>
diff --git a/res/values-w230dp-h475dp-port/dimens.xml b/res/values-w230dp-h475dp-port/dimens.xml
new file mode 100644
index 0000000..072a06e
--- /dev/null
+++ b/res/values-w230dp-h475dp-port/dimens.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources>
+ <!-- Dimens for display formula. -->
+ <dimen name="formula_padding_top">8dip</dimen>
+ <dimen name="formula_padding_bottom">18dip</dimen>
+ <dimen name="formula_padding_start">16dip</dimen>
+ <dimen name="formula_padding_end">16dip</dimen>
+ <dimen name="formula_min_textsize">32dip</dimen>
+ <dimen name="formula_max_textsize">56dip</dimen>
+ <dimen name="formula_step_textsize">8dip</dimen>
+
+ <!-- Dimens for display result. -->
+ <dimen name="result_padding_top">18dip</dimen>
+ <dimen name="result_padding_bottom">36dip</dimen>
+ <dimen name="result_padding_start">16dip</dimen>
+ <dimen name="result_padding_end">16dip</dimen>
+ <dimen name="result_textsize">32dip</dimen>
+</resources> \ No newline at end of file
diff --git a/res/values-w230dp-h475dp-port/styles.xml b/res/values-w230dp-h475dp-port/styles.xml
index 050de1e..05987ad 100644
--- a/res/values-w230dp-h475dp-port/styles.xml
+++ b/res/values-w230dp-h475dp-port/styles.xml
@@ -17,24 +17,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="DisplayTextStyle.Formula">
- <item name="android:paddingTop">8dip</item>
- <item name="android:paddingBottom">18dip</item>
- <item name="android:paddingStart">16dip</item>
- <item name="android:paddingEnd">16dip</item>
- <item name="minTextSize">32dip</item>
- <item name="maxTextSize">56dip</item>
- <item name="stepTextSize">8dip</item>
- </style>
-
- <style name="DisplayTextStyle.Result">
- <item name="android:paddingTop">18dip</item>
- <item name="android:paddingBottom">36dip</item>
- <item name="android:paddingStart">16dip</item>
- <item name="android:paddingEnd">16dip</item>
- <item name="android:textSize">32dip</item>
- </style>
-
<style name="PadButtonStyle.Advanced">
<item name="android:background">@drawable/pad_button_advanced_background</item>
<item name="android:textColor">@color/pad_button_advanced_text_color</item>
diff --git a/res/values-w375dp-h220dp/dimens.xml b/res/values-w375dp-h220dp/dimens.xml
new file mode 100644
index 0000000..10a6c21
--- /dev/null
+++ b/res/values-w375dp-h220dp/dimens.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources>
+ <!-- Dimens for display formula. -->
+ <dimen name="formula_padding_top">0dip</dimen>
+ <dimen name="formula_padding_bottom">8dip</dimen>
+ <dimen name="formula_padding_start">16dip</dimen>
+ <dimen name="formula_padding_end">16dip</dimen>
+ <dimen name="formula_min_textsize">28dip</dimen>
+ <dimen name="formula_max_textsize">28dip</dimen>
+ <dimen name="formula_step_textsize">8dip</dimen>
+
+ <!-- Dimens for display result. -->
+ <dimen name="result_padding_top">0dip</dimen>
+ <dimen name="result_padding_bottom">8dip</dimen>
+ <dimen name="result_padding_start">16dip</dimen>
+ <dimen name="result_padding_end">16dip</dimen>
+ <dimen name="result_textsize">28dip</dimen>
+</resources> \ No newline at end of file
diff --git a/res/values-w375dp-h220dp/styles.xml b/res/values-w375dp-h220dp/styles.xml
index 3c6fe85..16931ff 100644
--- a/res/values-w375dp-h220dp/styles.xml
+++ b/res/values-w375dp-h220dp/styles.xml
@@ -17,26 +17,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="DisplayTextStyle.Formula">
- <item name="android:paddingTop">0dip</item>
- <item name="android:paddingBottom">0dip</item>
- <item name="android:paddingStart">16dip</item>
- <item name="android:paddingEnd">16dip</item>
- <item name="android:gravity">bottom</item>
- <item name="minTextSize">28dip</item>
- <item name="maxTextSize">28dip</item>
- <item name="stepTextSize">8dip</item>
- </style>
-
- <style name="DisplayTextStyle.Result">
- <item name="android:paddingTop">0dip</item>
- <item name="android:paddingBottom">0dip</item>
- <item name="android:paddingStart">16dip</item>
- <item name="android:paddingEnd">16dip</item>
- <item name="android:gravity">bottom</item>
- <item name="android:textSize">28dip</item>
- </style>
-
<style name="PadButtonStyle.Advanced">
<item name="android:background">@drawable/pad_button_advanced_background</item>
<item name="android:textColor">@color/pad_button_advanced_text_color</item>
diff --git a/res/values-w375dp-h275dp/dimens.xml b/res/values-w375dp-h275dp/dimens.xml
new file mode 100644
index 0000000..10a6c21
--- /dev/null
+++ b/res/values-w375dp-h275dp/dimens.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources>
+ <!-- Dimens for display formula. -->
+ <dimen name="formula_padding_top">0dip</dimen>
+ <dimen name="formula_padding_bottom">8dip</dimen>
+ <dimen name="formula_padding_start">16dip</dimen>
+ <dimen name="formula_padding_end">16dip</dimen>
+ <dimen name="formula_min_textsize">28dip</dimen>
+ <dimen name="formula_max_textsize">28dip</dimen>
+ <dimen name="formula_step_textsize">8dip</dimen>
+
+ <!-- Dimens for display result. -->
+ <dimen name="result_padding_top">0dip</dimen>
+ <dimen name="result_padding_bottom">8dip</dimen>
+ <dimen name="result_padding_start">16dip</dimen>
+ <dimen name="result_padding_end">16dip</dimen>
+ <dimen name="result_textsize">28dip</dimen>
+</resources> \ No newline at end of file
diff --git a/res/values-w375dp-h275dp/styles.xml b/res/values-w375dp-h275dp/styles.xml
index c628645..efed4dc 100644
--- a/res/values-w375dp-h275dp/styles.xml
+++ b/res/values-w375dp-h275dp/styles.xml
@@ -17,26 +17,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="DisplayTextStyle.Formula">
- <item name="android:paddingTop">0dip</item>
- <item name="android:paddingBottom">0dip</item>
- <item name="android:paddingStart">16dip</item>
- <item name="android:paddingEnd">16dip</item>
- <item name="android:gravity">bottom</item>
- <item name="minTextSize">28dip</item>
- <item name="maxTextSize">28dip</item>
- <item name="stepTextSize">8dip</item>
- </style>
-
- <style name="DisplayTextStyle.Result">
- <item name="android:paddingTop">0dip</item>
- <item name="android:paddingBottom">0dip</item>
- <item name="android:paddingStart">16dip</item>
- <item name="android:paddingEnd">16dip</item>
- <item name="android:gravity">bottom</item>
- <item name="android:textSize">28dip</item>
- </style>
-
<style name="PadButtonStyle.Advanced">
<item name="android:background">@drawable/pad_button_advanced_background</item>
<item name="android:textColor">@color/pad_button_advanced_text_color</item>
diff --git a/res/values-w375dp-h375dp/dimens.xml b/res/values-w375dp-h375dp/dimens.xml
new file mode 100644
index 0000000..a747231
--- /dev/null
+++ b/res/values-w375dp-h375dp/dimens.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources>
+ <!-- Dimens for display formula. -->
+ <dimen name="formula_padding_top">2dip</dimen>
+ <dimen name="formula_padding_bottom">10dip</dimen>
+ <dimen name="formula_padding_start">16dip</dimen>
+ <dimen name="formula_padding_end">16dip</dimen>
+ <dimen name="formula_min_textsize">32dip</dimen>
+ <dimen name="formula_max_textsize">32dip</dimen>
+ <dimen name="formula_step_textsize">8dip</dimen>
+
+ <!-- Dimens for display result. -->
+ <dimen name="result_padding_top">12dip</dimen>
+ <dimen name="result_padding_bottom">18dip</dimen>
+ <dimen name="result_padding_start">16dip</dimen>
+ <dimen name="result_padding_end">16dip</dimen>
+ <dimen name="result_textsize">32dip</dimen>
+</resources> \ No newline at end of file
diff --git a/res/values-w375dp-h375dp/styles.xml b/res/values-w375dp-h375dp/styles.xml
index 14e96ca..b1d4ac5 100644
--- a/res/values-w375dp-h375dp/styles.xml
+++ b/res/values-w375dp-h375dp/styles.xml
@@ -17,24 +17,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="DisplayTextStyle.Formula">
- <item name="android:paddingTop">2dip</item>
- <item name="android:paddingBottom">10dip</item>
- <item name="android:paddingStart">16dip</item>
- <item name="android:paddingEnd">16dip</item>
- <item name="minTextSize">32dip</item>
- <item name="maxTextSize">32dip</item>
- <item name="stepTextSize">8dip</item>
- </style>
-
- <style name="DisplayTextStyle.Result">
- <item name="android:paddingTop">12dip</item>
- <item name="android:paddingBottom">18dip</item>
- <item name="android:paddingStart">16dip</item>
- <item name="android:paddingEnd">16dip</item>
- <item name="android:textSize">32dip</item>
- </style>
-
<style name="PadButtonStyle.Advanced">
<item name="android:background">@drawable/pad_button_advanced_background</item>
<item name="android:textColor">@color/pad_button_advanced_text_color</item>
diff --git a/res/values-w375dp-h500dp-port/dimens.xml b/res/values-w375dp-h500dp-port/dimens.xml
new file mode 100644
index 0000000..37508de
--- /dev/null
+++ b/res/values-w375dp-h500dp-port/dimens.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources>
+ <!-- Dimens for display formula. -->
+ <dimen name="formula_padding_top">16dip</dimen>
+ <dimen name="formula_padding_bottom">28dip</dimen>
+ <dimen name="formula_padding_start">16dip</dimen>
+ <dimen name="formula_padding_end">16dip</dimen>
+ <dimen name="formula_min_textsize">42dip</dimen>
+ <dimen name="formula_max_textsize">74dip</dimen>
+ <dimen name="formula_step_textsize">8dip</dimen>
+
+ <!-- Dimens for display result. -->
+ <dimen name="result_padding_top">16dip</dimen>
+ <dimen name="result_padding_bottom">42dip</dimen>
+ <dimen name="result_padding_start">16dip</dimen>
+ <dimen name="result_padding_end">16dip</dimen>
+ <dimen name="result_textsize">42dip</dimen>
+</resources> \ No newline at end of file
diff --git a/res/values-w375dp-h500dp-port/styles.xml b/res/values-w375dp-h500dp-port/styles.xml
index 066aa8e..5f5057e 100644
--- a/res/values-w375dp-h500dp-port/styles.xml
+++ b/res/values-w375dp-h500dp-port/styles.xml
@@ -17,24 +17,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="DisplayTextStyle.Formula">
- <item name="android:paddingTop">16dip</item>
- <item name="android:paddingBottom">28dip</item>
- <item name="android:paddingStart">16dip</item>
- <item name="android:paddingEnd">16dip</item>
- <item name="minTextSize">42dip</item>
- <item name="maxTextSize">74dip</item>
- <item name="stepTextSize">8dip</item>
- </style>
-
- <style name="DisplayTextStyle.Result">
- <item name="android:paddingTop">16dip</item>
- <item name="android:paddingBottom">42dip</item>
- <item name="android:paddingStart">16dip</item>
- <item name="android:paddingEnd">16dip</item>
- <item name="android:textSize">42dip</item>
- </style>
-
<style name="PadButtonStyle.Advanced">
<item name="android:background">@drawable/pad_button_advanced_background</item>
<item name="android:textColor">@color/pad_button_advanced_text_color</item>
diff --git a/res/values-w375dp-h768dp-port/dimens.xml b/res/values-w375dp-h768dp-port/dimens.xml
new file mode 100644
index 0000000..e74d35d
--- /dev/null
+++ b/res/values-w375dp-h768dp-port/dimens.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources>
+ <!-- Dimens for display formula. -->
+ <dimen name="formula_padding_top">16dip</dimen>
+ <dimen name="formula_padding_bottom">32dip</dimen>
+ <dimen name="formula_padding_start">44dip</dimen>
+ <dimen name="formula_padding_end">44dip</dimen>
+ <dimen name="formula_min_textsize">48dip</dimen>
+ <dimen name="formula_max_textsize">72dip</dimen>
+ <dimen name="formula_step_textsize">8dip</dimen>
+
+ <!-- Dimens for display result. -->
+ <dimen name="result_padding_top">20dip</dimen>
+ <dimen name="result_padding_bottom">48dip</dimen>
+ <dimen name="result_padding_start">44dip</dimen>
+ <dimen name="result_padding_end">44dip</dimen>
+ <dimen name="result_textsize">48dip</dimen>
+</resources> \ No newline at end of file
diff --git a/res/values-w375dp-h768dp-port/styles.xml b/res/values-w375dp-h768dp-port/styles.xml
index ec91033..2c5ae35 100644
--- a/res/values-w375dp-h768dp-port/styles.xml
+++ b/res/values-w375dp-h768dp-port/styles.xml
@@ -17,24 +17,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="DisplayTextStyle.Formula">
- <item name="android:paddingTop">16dip</item>
- <item name="android:paddingBottom">32dip</item>
- <item name="android:paddingStart">44dip</item>
- <item name="android:paddingEnd">44dip</item>
- <item name="minTextSize">48dip</item>
- <item name="maxTextSize">72dip</item>
- <item name="stepTextSize">8dip</item>
- </style>
-
- <style name="DisplayTextStyle.Result">
- <item name="android:paddingTop">20dip</item>
- <item name="android:paddingBottom">48dip</item>
- <item name="android:paddingStart">44dip</item>
- <item name="android:paddingEnd">44dip</item>
- <item name="android:textSize">48dip</item>
- </style>
-
<style name="PadButtonStyle.Advanced">
<item name="android:background">@drawable/pad_button_advanced_background</item>
<item name="android:textColor">@color/pad_button_advanced_text_color</item>
diff --git a/res/values-w520dp-h220dp-land/dimens.xml b/res/values-w520dp-h220dp-land/dimens.xml
new file mode 100644
index 0000000..0ae75b5
--- /dev/null
+++ b/res/values-w520dp-h220dp-land/dimens.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources>
+ <!-- Dimens for display formula. -->
+ <dimen name="formula_padding_top">0dip</dimen>
+ <dimen name="formula_padding_bottom">8dip</dimen>
+ <dimen name="formula_padding_start">36dip</dimen>
+ <dimen name="formula_padding_end">36dip</dimen>
+ <dimen name="formula_min_textsize">28dip</dimen>
+ <dimen name="formula_max_textsize">28dip</dimen>
+ <dimen name="formula_step_textsize">8dip</dimen>
+
+ <!-- Dimens for display result. -->
+ <dimen name="result_padding_top">0dip</dimen>
+ <dimen name="result_padding_bottom">8dip</dimen>
+ <dimen name="result_padding_start">36dip</dimen>
+ <dimen name="result_padding_end">36dip</dimen>
+ <dimen name="result_textsize">28dip</dimen>
+</resources> \ No newline at end of file
diff --git a/res/values-w520dp-h220dp-land/styles.xml b/res/values-w520dp-h220dp-land/styles.xml
index e90e530..536d5e7 100644
--- a/res/values-w520dp-h220dp-land/styles.xml
+++ b/res/values-w520dp-h220dp-land/styles.xml
@@ -17,26 +17,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="DisplayTextStyle.Formula">
- <item name="android:paddingTop">0dip</item>
- <item name="android:paddingBottom">0dip</item>
- <item name="android:paddingStart">36dip</item>
- <item name="android:paddingEnd">36dip</item>
- <item name="android:gravity">bottom</item>
- <item name="minTextSize">28dip</item>
- <item name="maxTextSize">28dip</item>
- <item name="stepTextSize">8dip</item>
- </style>
-
- <style name="DisplayTextStyle.Result">
- <item name="android:paddingTop">0dip</item>
- <item name="android:paddingBottom">0dip</item>
- <item name="android:paddingStart">36dip</item>
- <item name="android:paddingEnd">36dip</item>
- <item name="android:gravity">bottom</item>
- <item name="android:textSize">28dip</item>
- </style>
-
<style name="PadButtonStyle.Advanced">
<item name="android:background">@drawable/pad_button_advanced_background</item>
<item name="android:textColor">@color/pad_button_advanced_text_color</item>
diff --git a/res/values-w520dp-h275dp-land/dimens.xml b/res/values-w520dp-h275dp-land/dimens.xml
new file mode 100644
index 0000000..b00f26e
--- /dev/null
+++ b/res/values-w520dp-h275dp-land/dimens.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources>
+ <!-- Dimens for display formula. -->
+ <dimen name="formula_padding_top">2dip</dimen>
+ <dimen name="formula_padding_bottom">8dip</dimen>
+ <dimen name="formula_padding_start">36dip</dimen>
+ <dimen name="formula_padding_end">36dip</dimen>
+ <dimen name="formula_min_textsize">28dip</dimen>
+ <dimen name="formula_max_textsize">28dip</dimen>
+ <dimen name="formula_step_textsize">8dip</dimen>
+
+ <!-- Dimens for display result. -->
+ <dimen name="result_padding_top">8dip</dimen>
+ <dimen name="result_padding_bottom">16dip</dimen>
+ <dimen name="result_padding_start">36dip</dimen>
+ <dimen name="result_padding_end">36dip</dimen>
+ <dimen name="result_textsize">28dip</dimen>
+</resources> \ No newline at end of file
diff --git a/res/values-w520dp-h275dp-land/styles.xml b/res/values-w520dp-h275dp-land/styles.xml
index 9d66a9b..003949e 100644
--- a/res/values-w520dp-h275dp-land/styles.xml
+++ b/res/values-w520dp-h275dp-land/styles.xml
@@ -17,24 +17,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="DisplayTextStyle.Formula">
- <item name="android:paddingTop">2dip</item>
- <item name="android:paddingBottom">8dip</item>
- <item name="android:paddingStart">36dip</item>
- <item name="android:paddingEnd">36dip</item>
- <item name="minTextSize">28dip</item>
- <item name="maxTextSize">28dip</item>
- <item name="stepTextSize">8dip</item>
- </style>
-
- <style name="DisplayTextStyle.Result">
- <item name="android:paddingTop">8dip</item>
- <item name="android:paddingBottom">16dip</item>
- <item name="android:paddingStart">36dip</item>
- <item name="android:paddingEnd">36dip</item>
- <item name="android:textSize">28dip</item>
- </style>
-
<style name="PadButtonStyle.Advanced">
<item name="android:background">@drawable/pad_button_advanced_background</item>
<item name="android:textColor">@color/pad_button_advanced_text_color</item>
diff --git a/res/values-w520dp-h375dp-land/dimens.xml b/res/values-w520dp-h375dp-land/dimens.xml
new file mode 100644
index 0000000..7cfeb8e
--- /dev/null
+++ b/res/values-w520dp-h375dp-land/dimens.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources>
+ <!-- Dimens for display formula. -->
+ <dimen name="formula_padding_top">2dip</dimen>
+ <dimen name="formula_padding_bottom">10dip</dimen>
+ <dimen name="formula_padding_start">36dip</dimen>
+ <dimen name="formula_padding_end">36dip</dimen>
+ <dimen name="formula_min_textsize">32dip</dimen>
+ <dimen name="formula_max_textsize">32dip</dimen>
+ <dimen name="formula_step_textsize">8dip</dimen>
+
+ <!-- Dimens for display result. -->
+ <dimen name="result_padding_top">12dip</dimen>
+ <dimen name="result_padding_bottom">18dip</dimen>
+ <dimen name="result_padding_start">36dip</dimen>
+ <dimen name="result_padding_end">36dip</dimen>
+ <dimen name="result_textsize">32dip</dimen>
+</resources> \ No newline at end of file
diff --git a/res/values-w520dp-h375dp-land/styles.xml b/res/values-w520dp-h375dp-land/styles.xml
index d89ea24..8c7d0ed 100644
--- a/res/values-w520dp-h375dp-land/styles.xml
+++ b/res/values-w520dp-h375dp-land/styles.xml
@@ -17,24 +17,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="DisplayTextStyle.Formula">
- <item name="android:paddingTop">2dip</item>
- <item name="android:paddingBottom">10dip</item>
- <item name="android:paddingStart">36dip</item>
- <item name="android:paddingEnd">36dip</item>
- <item name="minTextSize">32dip</item>
- <item name="maxTextSize">32dip</item>
- <item name="stepTextSize">8dip</item>
- </style>
-
- <style name="DisplayTextStyle.Result">
- <item name="android:paddingTop">12dip</item>
- <item name="android:paddingBottom">18dip</item>
- <item name="android:paddingStart">36dip</item>
- <item name="android:paddingEnd">36dip</item>
- <item name="android:textSize">32dip</item>
- </style>
-
<style name="PadButtonStyle.Advanced">
<item name="android:background">@drawable/pad_button_advanced_background</item>
<item name="android:textColor">@color/pad_button_advanced_text_color</item>
diff --git a/res/values-w520dp-h500dp-land/dimens.xml b/res/values-w520dp-h500dp-land/dimens.xml
new file mode 100644
index 0000000..37508de
--- /dev/null
+++ b/res/values-w520dp-h500dp-land/dimens.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources>
+ <!-- Dimens for display formula. -->
+ <dimen name="formula_padding_top">16dip</dimen>
+ <dimen name="formula_padding_bottom">28dip</dimen>
+ <dimen name="formula_padding_start">16dip</dimen>
+ <dimen name="formula_padding_end">16dip</dimen>
+ <dimen name="formula_min_textsize">42dip</dimen>
+ <dimen name="formula_max_textsize">74dip</dimen>
+ <dimen name="formula_step_textsize">8dip</dimen>
+
+ <!-- Dimens for display result. -->
+ <dimen name="result_padding_top">16dip</dimen>
+ <dimen name="result_padding_bottom">42dip</dimen>
+ <dimen name="result_padding_start">16dip</dimen>
+ <dimen name="result_padding_end">16dip</dimen>
+ <dimen name="result_textsize">42dip</dimen>
+</resources> \ No newline at end of file
diff --git a/res/values-w520dp-h500dp-land/styles.xml b/res/values-w520dp-h500dp-land/styles.xml
index 883f6cd..e0cc0e2 100644
--- a/res/values-w520dp-h500dp-land/styles.xml
+++ b/res/values-w520dp-h500dp-land/styles.xml
@@ -17,24 +17,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="DisplayTextStyle.Formula">
- <item name="android:paddingTop">16dip</item>
- <item name="android:paddingBottom">28dip</item>
- <item name="android:paddingStart">16dip</item>
- <item name="android:paddingEnd">16dip</item>
- <item name="minTextSize">42dip</item>
- <item name="maxTextSize">74dip</item>
- <item name="stepTextSize">8dip</item>
- </style>
-
- <style name="DisplayTextStyle.Result">
- <item name="android:paddingTop">16dip</item>
- <item name="android:paddingBottom">42dip</item>
- <item name="android:paddingStart">16dip</item>
- <item name="android:paddingEnd">16dip</item>
- <item name="android:textSize">42dip</item>
- </style>
-
<style name="PadButtonStyle.Advanced">
<item name="android:background">@drawable/pad_button_advanced_background</item>
<item name="android:textColor">@color/pad_button_advanced_text_color</item>
diff --git a/res/values-w520dp-h768dp-land/dimens.xml b/res/values-w520dp-h768dp-land/dimens.xml
new file mode 100644
index 0000000..69b2f01
--- /dev/null
+++ b/res/values-w520dp-h768dp-land/dimens.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources>
+ <!-- Dimens for display formula. -->
+ <dimen name="formula_padding_top">24dip</dimen>
+ <dimen name="formula_padding_bottom">32dip</dimen>
+ <dimen name="formula_padding_start">44dip</dimen>
+ <dimen name="formula_padding_end">44dip</dimen>
+ <dimen name="formula_min_textsize">44dip</dimen>
+ <dimen name="formula_max_textsize">76dip</dimen>
+ <dimen name="formula_step_textsize">8dip</dimen>
+
+ <!-- Dimens for display result. -->
+ <dimen name="result_padding_top">24dip</dimen>
+ <dimen name="result_padding_bottom">56dip</dimen>
+ <dimen name="result_padding_start">44dip</dimen>
+ <dimen name="result_padding_end">44dip</dimen>
+ <dimen name="result_textsize">44dip</dimen>
+</resources> \ No newline at end of file
diff --git a/res/values-w520dp-h768dp-land/styles.xml b/res/values-w520dp-h768dp-land/styles.xml
index 9fdf68a..61acbd2 100644
--- a/res/values-w520dp-h768dp-land/styles.xml
+++ b/res/values-w520dp-h768dp-land/styles.xml
@@ -17,24 +17,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="DisplayTextStyle.Formula">
- <item name="android:paddingTop">24dip</item>
- <item name="android:paddingBottom">32dip</item>
- <item name="android:paddingStart">44dip</item>
- <item name="android:paddingEnd">44dip</item>
- <item name="minTextSize">44dip</item>
- <item name="maxTextSize">76dip</item>
- <item name="stepTextSize">8dip</item>
- </style>
-
- <style name="DisplayTextStyle.Result">
- <item name="android:paddingTop">24dip</item>
- <item name="android:paddingBottom">56dip</item>
- <item name="android:paddingStart">44dip</item>
- <item name="android:paddingEnd">44dip</item>
- <item name="android:textSize">44dip</item>
- </style>
-
<style name="PadButtonStyle.Advanced">
<item name="android:background">@drawable/pad_button_advanced_background</item>
<item name="android:textColor">@color/pad_button_advanced_text_color</item>
diff --git a/res/values-w520dp-h768dp-port/dimens.xml b/res/values-w520dp-h768dp-port/dimens.xml
new file mode 100644
index 0000000..e74d35d
--- /dev/null
+++ b/res/values-w520dp-h768dp-port/dimens.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources>
+ <!-- Dimens for display formula. -->
+ <dimen name="formula_padding_top">16dip</dimen>
+ <dimen name="formula_padding_bottom">32dip</dimen>
+ <dimen name="formula_padding_start">44dip</dimen>
+ <dimen name="formula_padding_end">44dip</dimen>
+ <dimen name="formula_min_textsize">48dip</dimen>
+ <dimen name="formula_max_textsize">72dip</dimen>
+ <dimen name="formula_step_textsize">8dip</dimen>
+
+ <!-- Dimens for display result. -->
+ <dimen name="result_padding_top">20dip</dimen>
+ <dimen name="result_padding_bottom">48dip</dimen>
+ <dimen name="result_padding_start">44dip</dimen>
+ <dimen name="result_padding_end">44dip</dimen>
+ <dimen name="result_textsize">48dip</dimen>
+</resources> \ No newline at end of file
diff --git a/res/values-w520dp-h768dp-port/styles.xml b/res/values-w520dp-h768dp-port/styles.xml
index 4d5e2db..9136b50 100644
--- a/res/values-w520dp-h768dp-port/styles.xml
+++ b/res/values-w520dp-h768dp-port/styles.xml
@@ -17,24 +17,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="DisplayTextStyle.Formula">
- <item name="android:paddingTop">16dip</item>
- <item name="android:paddingBottom">32dip</item>
- <item name="android:paddingStart">44dip</item>
- <item name="android:paddingEnd">44dip</item>
- <item name="minTextSize">48dip</item>
- <item name="maxTextSize">72dip</item>
- <item name="stepTextSize">8dip</item>
- </style>
-
- <style name="DisplayTextStyle.Result">
- <item name="android:paddingTop">20dip</item>
- <item name="android:paddingBottom">48dip</item>
- <item name="android:paddingStart">44dip</item>
- <item name="android:paddingEnd">44dip</item>
- <item name="android:textSize">48dip</item>
- </style>
-
<style name="PadButtonStyle.Advanced">
<item name="android:background">@drawable/pad_button_advanced_background</item>
<item name="android:textColor">@color/pad_button_advanced_text_color</item>
diff --git a/res/values/attr.xml b/res/values/attr.xml
index cfefc9d..825fc9f 100644
--- a/res/values/attr.xml
+++ b/res/values/attr.xml
@@ -17,7 +17,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <declare-styleable name="CalculatorText">
+ <declare-styleable name="CalculatorFormula">
<attr name="minTextSize" format="dimension" />
<attr name="maxTextSize" format="dimension" />
<attr name="stepTextSize" format="dimension" />
diff --git a/res/values/color.xml b/res/values/color.xml
index d63dcea..2f6475f 100644
--- a/res/values/color.xml
+++ b/res/values/color.xml
@@ -17,9 +17,15 @@
<resources>
- <!-- Default background color for the status bar. -->
+ <!-- Default accent color. -->
<color name="calculator_accent_color">#0097A7</color>
+ <!-- Primary color (Color for the toolbars). -->
+ <color name="calculator_primary_color">#00BCD4</color>
+
+ <!-- Status bar color. -->
+ <color name="calculator_statusbar_color">#0096A9</color>
+
<!-- Color to indicate an error has occured. -->
<color name="calculator_error_color">#C2185B</color>
@@ -27,7 +33,7 @@
<color name="display_background_color">#FFF</color>
<!-- Text color for the formula in the calculator display. -->
- <color name="display_formula_text_color">#8A000000</color>
+ <color name="display_formula_text_color">#000000</color>
<!-- Text color for the result in the calculator display. -->
<color name="display_result_text_color">#6C000000</color>
@@ -56,4 +62,7 @@
<!-- Ripple color when a button is pressed in a pad. -->
<color name="pad_button_advanced_ripple_color">#1A000000</color>
+ <!-- Background color for empty history view. -->
+ <color name="empty_history_color">#EEEEEE</color>
+
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 5218acd..827097a 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -20,4 +20,25 @@
<!-- The margin between the pad pages when displayed using a view pager. -->
<dimen name="pad_page_margin">24dip</dimen>
-</resources>
+ <dimen name="history_divider_padding">14dip</dimen>
+
+ <dimen name="history_item_text_padding_top">8dip</dimen>
+ <dimen name="history_item_text_padding_bottom">16dip</dimen>
+
+ <!-- Dimens for display formula. -->
+ <dimen name="formula_padding_top">0dip</dimen>
+ <dimen name="formula_padding_bottom">8dip</dimen>
+ <dimen name="formula_padding_start">16dip</dimen>
+ <dimen name="formula_padding_end">16dip</dimen>
+ <dimen name="formula_min_textsize">28dip</dimen>
+ <dimen name="formula_max_textsize">28dip</dimen>
+ <dimen name="formula_step_textsize">8dip</dimen>
+
+ <!-- Dimens for display result. -->
+ <dimen name="result_padding_top">0dip</dimen>
+ <dimen name="result_padding_bottom">8dip</dimen>
+ <dimen name="result_padding_start">16dip</dimen>
+ <dimen name="result_padding_end">16dip</dimen>
+ <dimen name="result_textsize">28dip</dimen>
+
+</resources> \ No newline at end of file
diff --git a/res/values-w230dp-h220dp/layout.xml b/res/values/layout.xml
index 0e698d5..0e698d5 100644
--- a/res/values-w230dp-h220dp/layout.xml
+++ b/res/values/layout.xml
diff --git a/res/values/strings.xml b/res/values/strings.xml
index d3d6b18..762378a 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -127,6 +127,22 @@
<!-- Toggle button to show/hide inverse functions. [CHAR_LIMIT=4] -->
<string name="inv" translatable="false">inv</string>
+ <!--
+ Item on Formula context menu used to paste from the Memory into the edit field. [CHAR_LIMIT=2]
+ -->
+ <string name="memory_recall" translatable="false">MR</string>
+ <!-- Item on Result context menu used to store the result in memory. [CHAR_LIMIT=2]
+ -->
+ <string name="memory_store" translatable="false">MS</string>
+ <!-- Item on Result context menu, which subtracts the current result from the number in memory.
+ [CHAR_LIMIT=2]
+ -->
+ <string name="memory_subtract" translatable="false">M\u2212</string>
+ <!-- Item on Result context menu, which adds the current result to the number in memory.
+ [CHAR_LIMIT=2]
+ -->
+ <string name="memory_add" translatable="false">M+</string>
+
<!-- Content description for 'e' button. [CHAR_LIMIT=NONE] -->
<string name="desc_const_e">Euler\'s number</string>
<!-- Content description for 'π' button. [CHAR_LIMIT=NONE] -->
@@ -215,6 +231,8 @@
<!-- Content description for formula field when it is empty. [CHAR_LIMIT=NONE] -->
<string name="desc_formula">No formula</string>
+ <!-- Content description for result field when it is empty. [CHAR_LIMIT=NONE] -->
+ <string name="desc_result">No result</string>
<!-- Content description for the numeric/operation pad when slide-able. [CHAR_LIMIT=NONE] -->
<string name="desc_num_pad">Numbers and basic operations</string>
@@ -248,9 +266,9 @@
<string name="text_copied_toast">Text copied</string>
<!-- Dialog message when a computation is cancelled by the user. [CHAR_LIMIT=NONE] -->
- <string name="cancelled">Computation cancelled</string>
+ <string name="cancelled">Computation cancelled.</string>
<!-- Dialog message when a computation times out. [CHAR_LIMIT=NONE] -->
- <string name="timeout">Timed out. Value may be infinite or undefined.</string>
+ <string name="timeout">Value may be infinite or undefined.</string>
<!--
Button label to allow future computations with a longer timeout.
@@ -274,5 +292,27 @@
<string name="menu_fraction">Answer as fraction</string>
<!-- Menu option to view the app's open source licenses. [CHAR_LIMIT=40] -->
<string name="menu_licenses">Open source licenses</string>
+ <!-- Menu option to access calculation history. [CHAR_LIMIT=40] -->
+ <string name="menu_history">History</string>
+ <!-- Menu option to clear calculation history and memory. [CHAR_LIMIT=40] -->
+ <string name="menu_clear_history">Clear</string>
+
+ <!-- Action bar title in history page. [CHAR_LIMIT=40] -->
+ <string name="title_history">History</string>
+ <!-- Action bar navigate up description in history page. [CHAR_LIMIT=40] -->
+ <string name="desc_navigate_up">Navigate up</string>
+
+ <!-- Title for alert dialog when calculation takes too long (timeout). [CHAR_LIMIT=30] -->
+ <string name="dialog_timeout">Timeout</string>
+
+ <!--
+ Message for alert dialog when user is about to clear history and memory. [CHAR_LIMIT=NONE]
+ -->
+ <string name="dialog_clear">Clear history and memory?</string>
+
+ <!-- Title for "current expression" in history page. [CHAR_LIMIT=40] -->
+ <string name="title_current_expression">Current Expression</string>
+ <!-- Placeholder string when there is no history to be shown. [CHAR_LIMIT=40] -->
+ <string name="no_history">No History</string>
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 4935103..5f4a9f6 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -18,7 +18,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="DisplayTextStyle" parent="@android:style/Widget.Material.Light.TextView">
- <item name="android:background">@android:color/transparent</item>
<item name="android:cursorVisible">false</item>
<item name="android:fontFamily">sans-serif-light</item>
<item name="android:includeFontPadding">false</item>
@@ -26,12 +25,39 @@
<item name="android:textAlignment">viewEnd</item>
</style>
+ <style name="DisplayTextStyle.Formula">
+ <item name="android:paddingTop">@dimen/formula_padding_top</item>
+ <item name="android:paddingBottom">@dimen/formula_padding_bottom</item>
+ <item name="android:paddingStart">@dimen/formula_padding_start</item>
+ <item name="android:paddingEnd">@dimen/formula_padding_end</item>
+ <item name="android:gravity">bottom</item>
+ <item name="minTextSize">@dimen/formula_min_textsize</item>
+ <item name="maxTextSize">@dimen/formula_max_textsize</item>
+ <item name="stepTextSize">@dimen/formula_step_textsize</item>
+ </style>
+
+ <style name="DisplayTextStyle.Result">
+ <item name="android:paddingTop">@dimen/result_padding_top</item>
+ <item name="android:paddingBottom">@dimen/result_padding_bottom</item>
+ <item name="android:paddingStart">@dimen/result_padding_start</item>
+ <item name="android:paddingEnd">@dimen/result_padding_end</item>
+ <item name="android:gravity">bottom</item>
+ <item name="android:textSize">@dimen/result_textsize</item>
+ </style>
+
+ <style name="HistoryItemTextStyle" parent="DisplayTextStyle">
+ <item name="android:layout_gravity">bottom|end</item>
+ <item name="android:paddingTop">@dimen/history_item_text_padding_top</item>
+ <item name="android:paddingBottom">@dimen/history_item_text_padding_bottom</item>
+ <!-- Note: result_padding_start == formula_padding_start. -->
+ <item name="android:paddingStart">@dimen/result_padding_start</item>
+ <item name="android:paddingEnd">@dimen/result_padding_end</item>
+ <item name="android:textSize">@dimen/result_textsize</item>
+ </style>
+
<style name="PadButtonStyle" parent="@android:style/Widget.Material.Light.Button.Borderless">
<item name="android:layout_width">0dip</item>
<item name="android:layout_height">0dip</item>
- <item name="android:layout_rowWeight">1</item>
- <item name="android:layout_columnWeight">1</item>
- <item name="android:layout_gravity">fill</item>
<item name="android:background">@drawable/pad_button_background</item>
<item name="android:fontFamily">sans-serif-light</item>
<item name="android:gravity">center</item>
@@ -41,6 +67,39 @@
<item name="android:onClick">onButtonClick</item>
<item name="android:textAllCaps">false</item>
<item name="android:textColor">@color/pad_button_text_color</item>
+
+ <!-- Attributes from android.support.v7.gridlayout -->
+ <item name="layout_gravity">fill</item>
+ <item name="layout_rowWeight">1</item>
+ <item name="layout_columnWeight">1</item>
+ </style>
+
+ <style name="PadButtonStyle.Advanced">
+ <item name="android:background">@drawable/pad_button_advanced_background</item>
+ <item name="android:textColor">@color/pad_button_advanced_text_color</item>
+ <item name="android:textSize">14dip</item>
+ </style>
+
+ <style name="PadButtonStyle.Advanced.Text">
+ <item name="android:textAllCaps">true</item>
+ <item name="android:textSize">12dip</item>
+ </style>
+
+ <style name="PadButtonStyle.Numeric">
+ <item name="android:textSize">16dip</item>
+ </style>
+
+ <style name="PadButtonStyle.Numeric.Equals">
+ <item name="android:visibility">visible</item>
+ </style>
+
+ <style name="PadButtonStyle.Operator">
+ <item name="android:textSize">14dip</item>
+ </style>
+
+ <style name="PadButtonStyle.Operator.Text">
+ <item name="android:textAllCaps">true</item>
+ <item name="android:textSize">12dip</item>
</style>
<style name="PadLayoutStyle">
@@ -48,4 +107,30 @@
<item name="android:layout_height">match_parent</item>
</style>
+ <style name="PadLayoutStyle.Advanced">
+ <item name="android:elevation">4dip</item>
+ <item name="android:paddingTop">2dip</item>
+ <item name="android:paddingBottom">8dip</item>
+ <item name="android:paddingStart">18dip</item>
+ <item name="android:paddingEnd">18dip</item>
+ </style>
+
+ <style name="PadLayoutStyle.Numeric">
+ <item name="android:layout_width">0dip</item>
+ <item name="android:layout_weight">7</item>
+ <item name="android:paddingTop">2dip</item>
+ <item name="android:paddingBottom">8dip</item>
+ <item name="android:paddingStart">8dip</item>
+ <item name="android:paddingEnd">8dip</item>
+ </style>
+
+ <style name="PadLayoutStyle.Operator">
+ <item name="android:layout_width">0dip</item>
+ <item name="android:layout_weight">3</item>
+ <item name="android:paddingTop">2dip</item>
+ <item name="android:paddingBottom">8dip</item>
+ <item name="android:paddingStart">4dip</item>
+ <item name="android:paddingEnd">28dip</item>
+ </style>
+
</resources>
diff --git a/res/values/themes.xml b/res/values/themes.xml
index b8c7600..36adfbe 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -18,7 +18,8 @@
<resources>
<style name="Theme" parent="@android:style/Theme.Material.Light.DarkActionBar">
- <item name="android:colorPrimary">@color/calculator_accent_color</item>
+ <item name="android:colorPrimary">@color/calculator_primary_color</item>
+ <item name="android:colorAccent">@color/calculator_accent_color</item>
<item name="android:statusBarColor">@color/calculator_accent_color</item>
<item name="android:windowSoftInputMode">stateAlwaysHidden</item>
</style>