summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorJustin Klaassen <justinklaassen@google.com>2014-05-27 17:53:10 -0700
committerJustin Klaassen <justinklaassen@google.com>2014-05-28 15:17:38 -0700
commit4b3af0578b1a44038856bc56244aea8aaeac22d1 (patch)
tree98685ecfd26c20e42bda03ae976e742c02478663 /res
parenta1d84550f39728b7a68e3f9c85d7f757ea55f114 (diff)
downloadandroid_packages_apps_ExactCalculator-4b3af0578b1a44038856bc56244aea8aaeac22d1.tar.gz
android_packages_apps_ExactCalculator-4b3af0578b1a44038856bc56244aea8aaeac22d1.tar.bz2
android_packages_apps_ExactCalculator-4b3af0578b1a44038856bc56244aea8aaeac22d1.zip
Overhaul Calculator UI.
Bug: 14418545 Bug: 14419084 Bug: 14419142 Bug: 14420277 Bug: 14466652 Bug: 14564559 Bug: 14564608 Bug: 14846724 Bug: 15090154 Bug: 15287699 Bug: 15289526 Bug: 15289616 Change-Id: I93e1530446d5bd6a4c3189f751c88ece1abc7767
Diffstat (limited to 'res')
-rw-r--r--res/drawable-hdpi/card_background.9.pngbin207 -> 0 bytes
-rw-r--r--res/drawable-hdpi/ic_delete_alpha.pngbin387 -> 0 bytes
-rw-r--r--res/drawable-ldpi/ic_delete_alpha.pngbin258 -> 0 bytes
-rw-r--r--res/drawable-mdpi/card_background.9.pngbin157 -> 0 bytes
-rw-r--r--res/drawable-mdpi/ic_delete_alpha.pngbin351 -> 0 bytes
-rw-r--r--res/drawable-xhdpi/card_background.9.pngbin250 -> 0 bytes
-rw-r--r--res/drawable-xhdpi/ic_delete_alpha.pngbin582 -> 0 bytes
-rw-r--r--res/drawable-xxhdpi/ic_delete_alpha.pngbin758 -> 0 bytes
-rw-r--r--res/drawable/btn_advanced.xml18
-rw-r--r--res/drawable/btn_digit.xml18
-rw-r--r--res/drawable/btn_function.xml18
-rw-r--r--res/drawable/display_shadow.xml23
-rw-r--r--res/drawable/ic_delete.xml4
-rw-r--r--res/drawable/pad_btn_background.xml21
-rw-r--r--res/drawable/pad_page_shadow.xml22
-rw-r--r--res/drawable/shadow_bottom.xml9
-rw-r--r--res/drawable/shadow_right.xml9
-rw-r--r--res/drawable/shadow_top.xml9
-rw-r--r--res/layout-land/advanced_pad.xml120
-rw-r--r--res/layout-land/history_item.xml26
-rw-r--r--res/layout-land/main.xml40
-rw-r--r--res/layout-land/simple_pad.xml156
-rw-r--r--res/layout-port/advanced_pad.xml124
-rw-r--r--res/layout-port/history_item.xml23
-rw-r--r--res/layout-port/main.xml41
-rw-r--r--res/layout-port/simple_pad.xml161
-rw-r--r--res/layout-sw600dp-land/advanced_pad.xml124
-rw-r--r--res/layout-sw600dp-land/main.xml55
-rw-r--r--res/layout-sw600dp-land/simple_pad.xml161
-rw-r--r--res/layout-sw600dp/advanced_pad.xml124
-rw-r--r--res/layout-sw600dp/main.xml47
-rw-r--r--res/layout-sw600dp/simple_pad.xml161
-rw-r--r--res/layout/activity_calculator_land.xml44
-rw-r--r--res/layout/activity_calculator_port.xml58
-rw-r--r--res/layout/activity_calculator_tablet_port.xml50
-rw-r--r--res/layout/display.xml50
-rw-r--r--res/layout/pad_advanced.xml108
-rw-r--r--res/layout/pad_numeric.xml99
-rw-r--r--res/layout/pad_operator_one_col.xml69
-rw-r--r--res/layout/pad_operator_two_col.xml80
-rw-r--r--res/values-land/arrays.xml54
-rw-r--r--res/values-land/layout.xml20
-rw-r--r--res/values-land/styles.xml97
-rw-r--r--res/values-port/arrays.xml54
-rw-r--r--res/values-port/dimens.xml23
-rw-r--r--res/values-port/layout.xml20
-rw-r--r--res/values-port/styles.xml97
-rw-r--r--res/values-sw600dp-land/styles.xml93
-rw-r--r--res/values-sw600dp-port/dimens.xml18
-rw-r--r--res/values-sw600dp-port/layout.xml20
-rw-r--r--res/values-sw600dp-port/styles.xml106
-rw-r--r--res/values-sw600dp/arrays.xml51
-rw-r--r--res/values-sw600dp/dimens.xml25
-rw-r--r--res/values-sw800dp-land/dimens.xml20
-rw-r--r--res/values-sw800dp-land/styles.xml93
-rw-r--r--res/values-sw800dp-port/dimens.xml20
-rw-r--r--res/values-sw800dp-port/layout.xml20
-rw-r--r--res/values-sw800dp-port/styles.xml105
-rw-r--r--res/values-sw800dp/dimens.xml21
-rw-r--r--res/values/attr.xml26
-rw-r--r--res/values/color.xml53
-rw-r--r--res/values/colors.xml39
-rw-r--r--res/values/constants.xml19
-rw-r--r--res/values/dimens.xml18
-rw-r--r--res/values/donottranslate_strings.xml50
-rw-r--r--res/values/strings.xml297
-rw-r--r--res/values/styles.xml144
67 files changed, 1591 insertions, 2084 deletions
diff --git a/res/drawable-hdpi/card_background.9.png b/res/drawable-hdpi/card_background.9.png
deleted file mode 100644
index bffcb47..0000000
--- a/res/drawable-hdpi/card_background.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_delete_alpha.png b/res/drawable-hdpi/ic_delete_alpha.png
deleted file mode 100644
index 03b6655..0000000
--- a/res/drawable-hdpi/ic_delete_alpha.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ldpi/ic_delete_alpha.png b/res/drawable-ldpi/ic_delete_alpha.png
deleted file mode 100644
index 7f6b461..0000000
--- a/res/drawable-ldpi/ic_delete_alpha.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/card_background.9.png b/res/drawable-mdpi/card_background.9.png
deleted file mode 100644
index dd2f251..0000000
--- a/res/drawable-mdpi/card_background.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_delete_alpha.png b/res/drawable-mdpi/ic_delete_alpha.png
deleted file mode 100644
index 4765362..0000000
--- a/res/drawable-mdpi/ic_delete_alpha.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/card_background.9.png b/res/drawable-xhdpi/card_background.9.png
deleted file mode 100644
index 68e9743..0000000
--- a/res/drawable-xhdpi/card_background.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_delete_alpha.png b/res/drawable-xhdpi/ic_delete_alpha.png
deleted file mode 100644
index 8232c2a..0000000
--- a/res/drawable-xhdpi/ic_delete_alpha.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_delete_alpha.png b/res/drawable-xxhdpi/ic_delete_alpha.png
deleted file mode 100644
index e60f09c..0000000
--- a/res/drawable-xxhdpi/ic_delete_alpha.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/btn_advanced.xml b/res/drawable/btn_advanced.xml
deleted file mode 100644
index 8f99f46..0000000
--- a/res/drawable/btn_advanced.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2011 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.
--->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
- android:tint="@color/primary_dark" android:pinned="true" />
diff --git a/res/drawable/btn_digit.xml b/res/drawable/btn_digit.xml
deleted file mode 100644
index 286b735..0000000
--- a/res/drawable/btn_digit.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2011 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.
--->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
- android:tint="@color/gray_50" android:pinned="true" />
diff --git a/res/drawable/btn_function.xml b/res/drawable/btn_function.xml
deleted file mode 100644
index fc4fa56..0000000
--- a/res/drawable/btn_function.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2011 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.
--->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
- android:tint="@color/gray_60" android:pinned="true" />
diff --git a/res/drawable/display_shadow.xml b/res/drawable/display_shadow.xml
new file mode 100644
index 0000000..e68b63d
--- /dev/null
+++ b/res/drawable/display_shadow.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+ <gradient
+ android:angle="90"
+ android:startColor="@android:color/transparent"
+ android:endColor="#33000000" />
+</shape> \ No newline at end of file
diff --git a/res/drawable/ic_delete.xml b/res/drawable/ic_delete.xml
deleted file mode 100644
index 367e7cf..0000000
--- a/res/drawable/ic_delete.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_delete_alpha"
- android:tint="@color/text_light" />
diff --git a/res/drawable/pad_btn_background.xml b/res/drawable/pad_btn_background.xml
new file mode 100644
index 0000000..1366dfc
--- /dev/null
+++ b/res/drawable/pad_btn_background.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+
+<ripple
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:tint="@color/pad_button_tint_color"
+ android:pinned="true" /> \ No newline at end of file
diff --git a/res/drawable/pad_page_shadow.xml b/res/drawable/pad_page_shadow.xml
new file mode 100644
index 0000000..4cd079b
--- /dev/null
+++ b/res/drawable/pad_page_shadow.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+ <gradient
+ android:startColor="@android:color/transparent"
+ android:endColor="#33000000" />
+</shape> \ No newline at end of file
diff --git a/res/drawable/shadow_bottom.xml b/res/drawable/shadow_bottom.xml
deleted file mode 100644
index e07dfdf..0000000
--- a/res/drawable/shadow_bottom.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <gradient
- android:angle="90"
- android:endColor="#C0000000"
- android:startColor="#00000000" />
-
-</shape> \ No newline at end of file
diff --git a/res/drawable/shadow_right.xml b/res/drawable/shadow_right.xml
deleted file mode 100644
index c842311..0000000
--- a/res/drawable/shadow_right.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <gradient
- android:angle="0"
- android:endColor="#33000000"
- android:startColor="#00000000" />
-
-</shape> \ No newline at end of file
diff --git a/res/drawable/shadow_top.xml b/res/drawable/shadow_top.xml
deleted file mode 100644
index fa30d3e..0000000
--- a/res/drawable/shadow_top.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <gradient
- android:angle="270"
- android:endColor="#C0000000"
- android:startColor="#00000000" />
-
-</shape> \ No newline at end of file
diff --git a/res/layout-land/advanced_pad.xml b/res/layout-land/advanced_pad.xml
deleted file mode 100644
index 06cb823..0000000
--- a/res/layout-land/advanced_pad.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-/*
-* Copyright (C) 2011, 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:id="@+id/advancedPad"
- style="@style/advanced_pad"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center"
- android:layout_weight="1"
- android:orientation="vertical" >
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" >
-
- <Button
- android:id="@+id/sin"
- style="@style/advanced_button_small"
- android:contentDescription="@string/sinDesc"
- android:text="@string/sin" />
-
- <Button
- android:id="@+id/cos"
- style="@style/advanced_button_small"
- android:contentDescription="@string/cosDesc"
- android:text="@string/cos" />
-
- <Button
- android:id="@+id/tan"
- style="@style/advanced_button_small"
- android:contentDescription="@string/tanDesc"
- android:text="@string/tan" />
-
- <Button
- android:id="@+id/leftParen"
- style="@style/function_button"
- android:contentDescription="@string/leftParenDesc"
- android:text="@string/leftParen" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" >
-
- <Button
- android:id="@+id/ln"
- style="@style/advanced_button_small"
- android:contentDescription="@string/lnDesc"
- android:text="@string/ln" />
-
- <Button
- android:id="@+id/lg"
- style="@style/advanced_button_small"
- android:contentDescription="@string/lgDesc"
- android:text="@string/lg" />
-
- <Button
- android:id="@+id/factorial"
- style="@style/advanced_button"
- android:contentDescription="@string/factorialDesc"
- android:text="@string/factorial" />
-
- <Button
- android:id="@+id/rightParen"
- style="@style/function_button"
- android:contentDescription="@string/rightParenDesc"
- android:text="@string/rightParen" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" >
-
- <Button
- android:id="@+id/pi"
- style="@style/advanced_button"
- android:contentDescription="@string/piDesc"
- android:text="@string/pi" />
-
- <Button
- android:id="@+id/e"
- style="@style/advanced_button"
- android:contentDescription="@string/eDesc"
- android:text="@string/e" />
-
- <Button
- android:id="@+id/power"
- style="@style/advanced_button"
- android:contentDescription="@string/powerDesc"
- android:text="@string/power" />
-
- <Button
- android:id="@+id/sqrt"
- style="@style/advanced_button"
- android:contentDescription="@string/sqrtDesc"
- android:text="@string/sqrt" />
- </LinearLayout>
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout-land/history_item.xml b/res/layout-land/history_item.xml
deleted file mode 100644
index 2147da7..0000000
--- a/res/layout-land/history_item.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- >
-
- <TextView
- android:id="@+id/historyExpr"
- android:layout_width="0px"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:textSize="23dp"
- android:singleLine="true"
- />
-
- <TextView
- android:id="@+id/historyResult"
- android:layout_width="180px"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:textSize="23dp"
- android:singleLine="true"
- />
-
-</LinearLayout>
diff --git a/res/layout-land/main.xml b/res/layout-land/main.xml
deleted file mode 100644
index a633e22..0000000
--- a/res/layout-land/main.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 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="match_parent"
- android:orientation="vertical" >
-
- <com.android.calculator2.CalculatorDisplay
- android:id="@+id/display"
- style="@style/display_holder_style"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- maxDigits="@integer/max_digits" >
-
- <com.android.calculator2.CalculatorEditText style="@style/display_style" />
-
- <com.android.calculator2.CalculatorEditText style="@style/display_style" />
- </com.android.calculator2.CalculatorDisplay>
-
- <com.android.calculator2.CalculatorViewPager
- android:id="@+id/panelswitch"
- android:layout_width="match_parent"
- android:layout_height="200dp" />
-
-</LinearLayout>
diff --git a/res/layout-land/simple_pad.xml b/res/layout-land/simple_pad.xml
deleted file mode 100644
index 84cd94a..0000000
--- a/res/layout-land/simple_pad.xml
+++ /dev/null
@@ -1,156 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 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:id="@+id/simplePad"
- style="@style/digit_pad"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center"
- android:orientation="vertical" >
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" >
-
- <Button
- android:id="@+id/digit7"
- style="@style/digit_button"
- android:text="@string/digit7" />
-
- <Button
- android:id="@+id/digit8"
- style="@style/digit_button"
- android:text="@string/digit8" />
-
- <Button
- android:id="@+id/digit9"
- style="@style/digit_button"
- android:text="@string/digit9" />
-
- <Button
- android:id="@+id/div"
- style="@style/function_button"
- android:contentDescription="@string/divDesc"
- android:text="@string/div" />
-
- <Button
- android:id="@+id/mul"
- style="@style/function_button"
- android:contentDescription="@string/mulDesc"
- android:text="@string/mul" />
-
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1" >
-
- <ImageButton
- android:id="@+id/del"
- style="@style/function_button"
- android:contentDescription="@string/delDesc"
- android:src="@drawable/ic_delete"
- android:textSize="@dimen/small_text_size" />
-
- <Button
- android:id="@+id/clear"
- style="@style/function_button"
- android:contentDescription="@string/clearDesc"
- android:text="@string/clear"
- android:textSize="@dimen/small_text_size"
- android:visibility="invisible" />
- </FrameLayout>
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" >
-
- <Button
- android:id="@+id/digit4"
- style="@style/digit_button"
- android:text="@string/digit4" />
-
- <Button
- android:id="@+id/digit5"
- style="@style/digit_button"
- android:text="@string/digit5" />
-
- <Button
- android:id="@+id/digit6"
- style="@style/digit_button"
- android:text="@string/digit6" />
-
- <Button
- android:id="@+id/plus"
- style="@style/function_button"
- android:contentDescription="@string/plusDesc"
- android:text="@string/plus" />
-
- <Button
- android:id="@+id/minus"
- style="@style/function_button"
- android:contentDescription="@string/minusDesc"
- android:text="@string/minus" />
-
- <View
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" >
-
- <Button
- android:id="@+id/digit1"
- style="@style/digit_button"
- android:text="@string/digit1" />
-
- <Button
- android:id="@+id/digit2"
- style="@style/digit_button"
- android:text="@string/digit2" />
-
- <Button
- android:id="@+id/digit3"
- style="@style/digit_button"
- android:text="@string/digit3" />
-
- <Button
- android:id="@+id/digit0"
- style="@style/digit_button"
- android:text="@string/digit0" />
-
- <Button
- android:id="@+id/dot"
- style="@style/digit_button"
- android:contentDescription="@string/dotDesc"
- android:text="@string/dot" />
-
- <Button
- android:id="@+id/equal"
- style="@style/function_button"
- android:contentDescription="@string/equalDesc"
- android:text="@string/equal" />
- </LinearLayout>
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout-port/advanced_pad.xml b/res/layout-port/advanced_pad.xml
deleted file mode 100644
index 73409f1..0000000
--- a/res/layout-port/advanced_pad.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-/*
-* Copyright (C) 2011, 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:id="@+id/advancedPad"
- style="@style/advanced_pad"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" >
-
- <Button
- android:id="@+id/sin"
- style="@style/advanced_button_small"
- android:contentDescription="@string/sinDesc"
- android:text="@string/sin" />
-
- <Button
- android:id="@+id/cos"
- style="@style/advanced_button_small"
- android:contentDescription="@string/cosDesc"
- android:text="@string/cos" />
-
- <Button
- android:id="@+id/tan"
- style="@style/advanced_button_small"
- android:contentDescription="@string/tanDesc"
- android:text="@string/tan" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" >
-
- <Button
- android:id="@+id/ln"
- style="@style/advanced_button_small"
- android:contentDescription="@string/lnDesc"
- android:text="@string/ln" />
-
- <Button
- android:id="@+id/lg"
- style="@style/advanced_button_small"
- android:contentDescription="@string/lgDesc"
- android:text="@string/lg" />
-
- <Button
- android:id="@+id/factorial"
- style="@style/advanced_button"
- android:contentDescription="@string/factorialDesc"
- android:text="@string/factorial" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" >
-
- <Button
- android:id="@+id/pi"
- style="@style/advanced_button"
- android:contentDescription="@string/piDesc"
- android:text="@string/pi" />
-
- <Button
- android:id="@+id/e"
- style="@style/advanced_button"
- android:contentDescription="@string/eDesc"
- android:text="@string/e" />
-
- <Button
- android:id="@+id/power"
- style="@style/advanced_button"
- android:contentDescription="@string/powerDesc"
- android:text="@string/power" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" >
-
- <Button
- android:id="@+id/leftParen"
- style="@style/advanced_button"
- android:contentDescription="@string/leftParenDesc"
- android:text="@string/leftParen" />
-
- <Button
- android:id="@+id/rightParen"
- style="@style/advanced_button"
- android:contentDescription="@string/rightParenDesc"
- android:text="@string/rightParen" />
-
- <Button
- android:id="@+id/sqrt"
- style="@style/advanced_button"
- android:contentDescription="@string/sqrtDesc"
- android:text="@string/sqrt" />
- </LinearLayout>
-
-</LinearLayout>
diff --git a/res/layout-port/history_item.xml b/res/layout-port/history_item.xml
deleted file mode 100644
index 61f7099..0000000
--- a/res/layout-port/history_item.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@drawable/card_background"
- android:padding="8dp"
- android:orientation="vertical" >
-
- <TextView
- android:id="@+id/historyExpr"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:textSize="24sp" />
-
- <TextView
- android:id="@+id/historyResult"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:textSize="48sp" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout-port/main.xml b/res/layout-port/main.xml
deleted file mode 100644
index 8ed7aad..0000000
--- a/res/layout-port/main.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 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="match_parent"
- android:orientation="vertical" >
-
- <com.android.calculator2.CalculatorDisplay
- android:id="@+id/display"
- style="@style/display_holder_style"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- maxDigits="@integer/max_digits" >
-
- <com.android.calculator2.CalculatorEditText style="@style/display_style" />
-
- <com.android.calculator2.CalculatorEditText style="@style/display_style" />
- </com.android.calculator2.CalculatorDisplay>
-
- <com.android.calculator2.CalculatorViewPager
- android:id="@+id/panelswitch"
- android:layout_width="match_parent"
- android:layout_height="360dp" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout-port/simple_pad.xml b/res/layout-port/simple_pad.xml
deleted file mode 100644
index 276e079..0000000
--- a/res/layout-port/simple_pad.xml
+++ /dev/null
@@ -1,161 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 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:id="@+id/simplePad"
- style="@style/digit_pad"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:baselineAligned="true"
- android:orientation="horizontal" >
-
- <LinearLayout
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical" >
-
- <Button
- android:id="@+id/digit7"
- style="@style/digit_button"
- android:text="@string/digit7" />
-
- <Button
- android:id="@+id/digit4"
- style="@style/digit_button"
- android:text="@string/digit4" />
-
- <Button
- android:id="@+id/digit1"
- style="@style/digit_button"
- android:text="@string/digit1" />
-
- <Button
- android:id="@+id/dot"
- style="@style/digit_button"
- android:contentDescription="@string/dotDesc"
- android:text="@string/dot" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical" >
-
- <Button
- android:id="@+id/digit8"
- style="@style/digit_button"
- android:text="@string/digit8" />
-
- <Button
- android:id="@+id/digit5"
- style="@style/digit_button"
- android:text="@string/digit5" />
-
- <Button
- android:id="@+id/digit2"
- style="@style/digit_button"
- android:text="@string/digit2" />
-
- <Button
- android:id="@+id/digit0"
- style="@style/digit_button"
- android:text="@string/digit0" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical" >
-
- <Button
- android:id="@+id/digit9"
- style="@style/digit_button"
- android:text="@string/digit9" />
-
- <Button
- android:id="@+id/digit6"
- style="@style/digit_button"
- android:text="@string/digit6" />
-
- <Button
- android:id="@+id/digit3"
- style="@style/digit_button"
- android:text="@string/digit3" />
-
- <Button
- android:id="@+id/equal"
- style="@style/digit_button"
- android:contentDescription="@string/equalDesc"
- android:text="@string/equal" />
- </LinearLayout>
-
- <LinearLayout
- style="@style/function_pad"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical" >
-
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1" >
-
- <ImageButton
- android:id="@+id/del"
- style="@style/function_button"
- android:contentDescription="@string/delDesc"
- android:src="@drawable/ic_delete"
- android:textSize="@dimen/small_text_size" />
-
- <Button
- android:id="@+id/clear"
- style="@style/function_button"
- android:contentDescription="@string/clearDesc"
- android:text="@string/clear"
- android:textSize="@dimen/small_text_size"
- android:visibility="invisible" />
- </FrameLayout>
-
- <Button
- android:id="@+id/div"
- style="@style/function_button"
- android:contentDescription="@string/divDesc"
- android:text="@string/div" />
-
- <Button
- android:id="@+id/mul"
- style="@style/function_button"
- android:contentDescription="@string/mulDesc"
- android:text="@string/mul" />
-
- <Button
- android:id="@+id/minus"
- style="@style/function_button"
- android:contentDescription="@string/minusDesc"
- android:text="@string/minus" />
-
- <Button
- android:id="@+id/plus"
- style="@style/function_button"
- android:contentDescription="@string/plusDesc"
- android:text="@string/plus" />
- </LinearLayout>
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout-sw600dp-land/advanced_pad.xml b/res/layout-sw600dp-land/advanced_pad.xml
deleted file mode 100644
index 73409f1..0000000
--- a/res/layout-sw600dp-land/advanced_pad.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-/*
-* Copyright (C) 2011, 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:id="@+id/advancedPad"
- style="@style/advanced_pad"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" >
-
- <Button
- android:id="@+id/sin"
- style="@style/advanced_button_small"
- android:contentDescription="@string/sinDesc"
- android:text="@string/sin" />
-
- <Button
- android:id="@+id/cos"
- style="@style/advanced_button_small"
- android:contentDescription="@string/cosDesc"
- android:text="@string/cos" />
-
- <Button
- android:id="@+id/tan"
- style="@style/advanced_button_small"
- android:contentDescription="@string/tanDesc"
- android:text="@string/tan" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" >
-
- <Button
- android:id="@+id/ln"
- style="@style/advanced_button_small"
- android:contentDescription="@string/lnDesc"
- android:text="@string/ln" />
-
- <Button
- android:id="@+id/lg"
- style="@style/advanced_button_small"
- android:contentDescription="@string/lgDesc"
- android:text="@string/lg" />
-
- <Button
- android:id="@+id/factorial"
- style="@style/advanced_button"
- android:contentDescription="@string/factorialDesc"
- android:text="@string/factorial" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" >
-
- <Button
- android:id="@+id/pi"
- style="@style/advanced_button"
- android:contentDescription="@string/piDesc"
- android:text="@string/pi" />
-
- <Button
- android:id="@+id/e"
- style="@style/advanced_button"
- android:contentDescription="@string/eDesc"
- android:text="@string/e" />
-
- <Button
- android:id="@+id/power"
- style="@style/advanced_button"
- android:contentDescription="@string/powerDesc"
- android:text="@string/power" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" >
-
- <Button
- android:id="@+id/leftParen"
- style="@style/advanced_button"
- android:contentDescription="@string/leftParenDesc"
- android:text="@string/leftParen" />
-
- <Button
- android:id="@+id/rightParen"
- style="@style/advanced_button"
- android:contentDescription="@string/rightParenDesc"
- android:text="@string/rightParen" />
-
- <Button
- android:id="@+id/sqrt"
- style="@style/advanced_button"
- android:contentDescription="@string/sqrtDesc"
- android:text="@string/sqrt" />
- </LinearLayout>
-
-</LinearLayout>
diff --git a/res/layout-sw600dp-land/main.xml b/res/layout-sw600dp-land/main.xml
deleted file mode 100644
index 309afae..0000000
--- a/res/layout-sw600dp-land/main.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 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="match_parent"
- android:orientation="vertical" >
-
- <com.android.calculator2.CalculatorDisplay
- android:id="@+id/display"
- style="@style/display_holder_style"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- maxDigits="@integer/max_digits" >
-
- <com.android.calculator2.CalculatorEditText style="@style/display_style" />
-
- <com.android.calculator2.CalculatorEditText style="@style/display_style" />
- </com.android.calculator2.CalculatorDisplay>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="360dp"
- android:baselineAligned="false"
- android:orientation="horizontal" >
-
- <include
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- layout="@layout/simple_pad" />
-
- <include
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- layout="@layout/advanced_pad" />
- </LinearLayout>
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout-sw600dp-land/simple_pad.xml b/res/layout-sw600dp-land/simple_pad.xml
deleted file mode 100644
index 276e079..0000000
--- a/res/layout-sw600dp-land/simple_pad.xml
+++ /dev/null
@@ -1,161 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 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:id="@+id/simplePad"
- style="@style/digit_pad"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:baselineAligned="true"
- android:orientation="horizontal" >
-
- <LinearLayout
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical" >
-
- <Button
- android:id="@+id/digit7"
- style="@style/digit_button"
- android:text="@string/digit7" />
-
- <Button
- android:id="@+id/digit4"
- style="@style/digit_button"
- android:text="@string/digit4" />
-
- <Button
- android:id="@+id/digit1"
- style="@style/digit_button"
- android:text="@string/digit1" />
-
- <Button
- android:id="@+id/dot"
- style="@style/digit_button"
- android:contentDescription="@string/dotDesc"
- android:text="@string/dot" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical" >
-
- <Button
- android:id="@+id/digit8"
- style="@style/digit_button"
- android:text="@string/digit8" />
-
- <Button
- android:id="@+id/digit5"
- style="@style/digit_button"
- android:text="@string/digit5" />
-
- <Button
- android:id="@+id/digit2"
- style="@style/digit_button"
- android:text="@string/digit2" />
-
- <Button
- android:id="@+id/digit0"
- style="@style/digit_button"
- android:text="@string/digit0" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical" >
-
- <Button
- android:id="@+id/digit9"
- style="@style/digit_button"
- android:text="@string/digit9" />
-
- <Button
- android:id="@+id/digit6"
- style="@style/digit_button"
- android:text="@string/digit6" />
-
- <Button
- android:id="@+id/digit3"
- style="@style/digit_button"
- android:text="@string/digit3" />
-
- <Button
- android:id="@+id/equal"
- style="@style/digit_button"
- android:contentDescription="@string/equalDesc"
- android:text="@string/equal" />
- </LinearLayout>
-
- <LinearLayout
- style="@style/function_pad"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical" >
-
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1" >
-
- <ImageButton
- android:id="@+id/del"
- style="@style/function_button"
- android:contentDescription="@string/delDesc"
- android:src="@drawable/ic_delete"
- android:textSize="@dimen/small_text_size" />
-
- <Button
- android:id="@+id/clear"
- style="@style/function_button"
- android:contentDescription="@string/clearDesc"
- android:text="@string/clear"
- android:textSize="@dimen/small_text_size"
- android:visibility="invisible" />
- </FrameLayout>
-
- <Button
- android:id="@+id/div"
- style="@style/function_button"
- android:contentDescription="@string/divDesc"
- android:text="@string/div" />
-
- <Button
- android:id="@+id/mul"
- style="@style/function_button"
- android:contentDescription="@string/mulDesc"
- android:text="@string/mul" />
-
- <Button
- android:id="@+id/minus"
- style="@style/function_button"
- android:contentDescription="@string/minusDesc"
- android:text="@string/minus" />
-
- <Button
- android:id="@+id/plus"
- style="@style/function_button"
- android:contentDescription="@string/plusDesc"
- android:text="@string/plus" />
- </LinearLayout>
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout-sw600dp/advanced_pad.xml b/res/layout-sw600dp/advanced_pad.xml
deleted file mode 100644
index 73409f1..0000000
--- a/res/layout-sw600dp/advanced_pad.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-/*
-* Copyright (C) 2011, 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:id="@+id/advancedPad"
- style="@style/advanced_pad"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" >
-
- <Button
- android:id="@+id/sin"
- style="@style/advanced_button_small"
- android:contentDescription="@string/sinDesc"
- android:text="@string/sin" />
-
- <Button
- android:id="@+id/cos"
- style="@style/advanced_button_small"
- android:contentDescription="@string/cosDesc"
- android:text="@string/cos" />
-
- <Button
- android:id="@+id/tan"
- style="@style/advanced_button_small"
- android:contentDescription="@string/tanDesc"
- android:text="@string/tan" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" >
-
- <Button
- android:id="@+id/ln"
- style="@style/advanced_button_small"
- android:contentDescription="@string/lnDesc"
- android:text="@string/ln" />
-
- <Button
- android:id="@+id/lg"
- style="@style/advanced_button_small"
- android:contentDescription="@string/lgDesc"
- android:text="@string/lg" />
-
- <Button
- android:id="@+id/factorial"
- style="@style/advanced_button"
- android:contentDescription="@string/factorialDesc"
- android:text="@string/factorial" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" >
-
- <Button
- android:id="@+id/pi"
- style="@style/advanced_button"
- android:contentDescription="@string/piDesc"
- android:text="@string/pi" />
-
- <Button
- android:id="@+id/e"
- style="@style/advanced_button"
- android:contentDescription="@string/eDesc"
- android:text="@string/e" />
-
- <Button
- android:id="@+id/power"
- style="@style/advanced_button"
- android:contentDescription="@string/powerDesc"
- android:text="@string/power" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" >
-
- <Button
- android:id="@+id/leftParen"
- style="@style/advanced_button"
- android:contentDescription="@string/leftParenDesc"
- android:text="@string/leftParen" />
-
- <Button
- android:id="@+id/rightParen"
- style="@style/advanced_button"
- android:contentDescription="@string/rightParenDesc"
- android:text="@string/rightParen" />
-
- <Button
- android:id="@+id/sqrt"
- style="@style/advanced_button"
- android:contentDescription="@string/sqrtDesc"
- android:text="@string/sqrt" />
- </LinearLayout>
-
-</LinearLayout>
diff --git a/res/layout-sw600dp/main.xml b/res/layout-sw600dp/main.xml
deleted file mode 100644
index 964fe48..0000000
--- a/res/layout-sw600dp/main.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 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="match_parent"
- android:orientation="vertical" >
-
- <com.android.calculator2.CalculatorDisplay
- android:id="@+id/display"
- style="@style/display_holder_style"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- maxDigits="@integer/max_digits" >
-
- <com.android.calculator2.CalculatorEditText style="@style/display_style" />
-
- <com.android.calculator2.CalculatorEditText style="@style/display_style" />
- </com.android.calculator2.CalculatorDisplay>
-
- <include
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- layout="@layout/advanced_pad" />
-
- <include
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- layout="@layout/simple_pad" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout-sw600dp/simple_pad.xml b/res/layout-sw600dp/simple_pad.xml
deleted file mode 100644
index 276e079..0000000
--- a/res/layout-sw600dp/simple_pad.xml
+++ /dev/null
@@ -1,161 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 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:id="@+id/simplePad"
- style="@style/digit_pad"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:baselineAligned="true"
- android:orientation="horizontal" >
-
- <LinearLayout
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical" >
-
- <Button
- android:id="@+id/digit7"
- style="@style/digit_button"
- android:text="@string/digit7" />
-
- <Button
- android:id="@+id/digit4"
- style="@style/digit_button"
- android:text="@string/digit4" />
-
- <Button
- android:id="@+id/digit1"
- style="@style/digit_button"
- android:text="@string/digit1" />
-
- <Button
- android:id="@+id/dot"
- style="@style/digit_button"
- android:contentDescription="@string/dotDesc"
- android:text="@string/dot" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical" >
-
- <Button
- android:id="@+id/digit8"
- style="@style/digit_button"
- android:text="@string/digit8" />
-
- <Button
- android:id="@+id/digit5"
- style="@style/digit_button"
- android:text="@string/digit5" />
-
- <Button
- android:id="@+id/digit2"
- style="@style/digit_button"
- android:text="@string/digit2" />
-
- <Button
- android:id="@+id/digit0"
- style="@style/digit_button"
- android:text="@string/digit0" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical" >
-
- <Button
- android:id="@+id/digit9"
- style="@style/digit_button"
- android:text="@string/digit9" />
-
- <Button
- android:id="@+id/digit6"
- style="@style/digit_button"
- android:text="@string/digit6" />
-
- <Button
- android:id="@+id/digit3"
- style="@style/digit_button"
- android:text="@string/digit3" />
-
- <Button
- android:id="@+id/equal"
- style="@style/digit_button"
- android:contentDescription="@string/equalDesc"
- android:text="@string/equal" />
- </LinearLayout>
-
- <LinearLayout
- style="@style/function_pad"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical" >
-
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1" >
-
- <ImageButton
- android:id="@+id/del"
- style="@style/function_button"
- android:contentDescription="@string/delDesc"
- android:src="@drawable/ic_delete"
- android:textSize="@dimen/small_text_size" />
-
- <Button
- android:id="@+id/clear"
- style="@style/function_button"
- android:contentDescription="@string/clearDesc"
- android:text="@string/clear"
- android:textSize="@dimen/small_text_size"
- android:visibility="invisible" />
- </FrameLayout>
-
- <Button
- android:id="@+id/div"
- style="@style/function_button"
- android:contentDescription="@string/divDesc"
- android:text="@string/div" />
-
- <Button
- android:id="@+id/mul"
- style="@style/function_button"
- android:contentDescription="@string/mulDesc"
- android:text="@string/mul" />
-
- <Button
- android:id="@+id/minus"
- style="@style/function_button"
- android:contentDescription="@string/minusDesc"
- android:text="@string/minus" />
-
- <Button
- android:id="@+id/plus"
- style="@style/function_button"
- android:contentDescription="@string/plusDesc"
- android:text="@string/plus" />
- </LinearLayout>
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout/activity_calculator_land.xml b/res/layout/activity_calculator_land.xml
new file mode 100644
index 0000000..8a1fac2
--- /dev/null
+++ b/res/layout/activity_calculator_land.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+
+<RelativeLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <include
+ android:id="@+id/display"
+ layout="@layout/display"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_below="@id/display">
+
+ <include layout="@layout/pad_numeric" />
+ <include layout="@layout/pad_operator_two_col" />
+ <include layout="@layout/pad_advanced" />
+
+ </LinearLayout>
+
+ <View
+ style="@style/DisplayShadowStyle"
+ android:layout_below="@id/display" />
+
+</RelativeLayout>
diff --git a/res/layout/activity_calculator_port.xml b/res/layout/activity_calculator_port.xml
new file mode 100644
index 0000000..ddc7c8b
--- /dev/null
+++ b/res/layout/activity_calculator_port.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+
+<RelativeLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <include
+ android:id="@+id/display"
+ layout="@layout/display"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+ <com.android.calculator2.CalculatorPadViewPager
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_below="@id/display">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <include layout="@layout/pad_numeric" />
+ <include layout="@layout/pad_operator_one_col" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <View style="@style/PadPageShadow" />
+ <include layout="@layout/pad_advanced" />
+
+ </LinearLayout>
+
+ </com.android.calculator2.CalculatorPadViewPager>
+
+ <View
+ style="@style/DisplayShadowStyle"
+ android:layout_below="@id/display" />
+
+</RelativeLayout>
diff --git a/res/layout/activity_calculator_tablet_port.xml b/res/layout/activity_calculator_tablet_port.xml
new file mode 100644
index 0000000..d5a99db
--- /dev/null
+++ b/res/layout/activity_calculator_tablet_port.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+
+<RelativeLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <include
+ android:id="@+id/display"
+ layout="@layout/display"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_below="@id/display"
+ android:orientation="vertical">
+
+ <include layout="@layout/pad_advanced" />
+
+ <LinearLayout style="@style/PadLinearLayoutStyle">
+
+ <include layout="@layout/pad_numeric" />
+ <include layout="@layout/pad_operator_two_col" />
+
+ </LinearLayout>
+
+ </LinearLayout>
+
+ <View
+ style="@style/DisplayShadowStyle"
+ android:layout_below="@id/display" />
+
+</RelativeLayout>
diff --git a/res/layout/display.xml b/res/layout/display.xml
new file mode 100644
index 0000000..3b9b624
--- /dev/null
+++ b/res/layout/display.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+
+<RelativeLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/display_background_color">
+
+ <com.android.calculator2.CalculatorEditText
+ android:id="@+id/formula"
+ style="@style/DisplayEditTextStyle.Formula"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:inputType="text|textNoSuggestions"
+ android:textColor="@color/display_formula_text_color" />
+
+ <com.android.calculator2.CalculatorEditText
+ android:id="@+id/result"
+ style="@style/DisplayEditTextStyle.Result"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/formula"
+ android:inputType="none"
+ android:textColor="@color/display_result_text_color" />
+
+ <View
+ android:id="@+id/reveal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignTop="@id/formula"
+ android:layout_alignBottom="@id/result"
+ android:background="@color/calculator_accent_color"
+ android:visibility="gone" />
+
+</RelativeLayout> \ No newline at end of file
diff --git a/res/layout/pad_advanced.xml b/res/layout/pad_advanced.xml
new file mode 100644
index 0000000..5e8fec0
--- /dev/null
+++ b/res/layout/pad_advanced.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.CalculatorPadLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/pad_advanced"
+ style="@style/PadLayoutStyle.Advanced"
+ android:background="@color/pad_advanced_background_color">
+
+ <Button
+ android:id="@+id/fun_sin"
+ style="@style/PadButtonStyle.Advanced"
+ android:contentDescription="@string/desc_fun_sin"
+ android:onClick="onButtonClick"
+ android:text="@string/fun_sin" />
+
+ <Button
+ android:id="@+id/fun_cos"
+ style="@style/PadButtonStyle.Advanced"
+ android:contentDescription="@string/desc_fun_cos"
+ android:onClick="onButtonClick"
+ android:text="@string/fun_cos" />
+
+ <Button
+ android:id="@+id/fun_tan"
+ style="@style/PadButtonStyle.Advanced"
+ android:contentDescription="@string/desc_fun_tan"
+ android:onClick="onButtonClick"
+ android:text="@string/fun_tan" />
+
+ <Button
+ android:id="@+id/fun_ln"
+ style="@style/PadButtonStyle.Advanced"
+ android:contentDescription="@string/desc_fun_ln"
+ android:onClick="onButtonClick"
+ android:text="@string/fun_ln" />
+
+ <Button
+ android:id="@+id/fun_log"
+ style="@style/PadButtonStyle.Advanced"
+ android:contentDescription="@string/desc_fun_log"
+ android:onClick="onButtonClick"
+ android:text="@string/fun_log" />
+
+ <Button
+ android:id="@+id/op_fact"
+ style="@style/PadButtonStyle.Advanced"
+ android:contentDescription="@string/desc_op_fact"
+ android:onClick="onButtonClick"
+ android:text="@string/op_fact" />
+
+ <Button
+ android:id="@+id/const_pi"
+ style="@style/PadButtonStyle.Advanced"
+ android:contentDescription="@string/desc_const_pi"
+ android:onClick="onButtonClick"
+ android:text="@string/const_pi" />
+
+ <Button
+ android:id="@+id/const_e"
+ style="@style/PadButtonStyle.Advanced"
+ android:contentDescription="@string/desc_const_e"
+ android:onClick="onButtonClick"
+ android:text="@string/const_e" />
+
+ <Button
+ android:id="@+id/op_pow"
+ style="@style/PadButtonStyle.Advanced"
+ android:contentDescription="@string/desc_op_pow"
+ android:onClick="onButtonClick"
+ android:text="@string/op_pow" />
+
+ <Button
+ android:id="@+id/lparen"
+ style="@style/PadButtonStyle.Advanced"
+ android:contentDescription="@string/desc_lparen"
+ android:onClick="onButtonClick"
+ android:text="@string/lparen" />
+
+ <Button
+ android:id="@+id/rparen"
+ style="@style/PadButtonStyle.Advanced"
+ android:contentDescription="@string/desc_rparen"
+ android:onClick="onButtonClick"
+ android:text="@string/rparen" />
+
+ <Button
+ android:id="@+id/op_sqrt"
+ style="@style/PadButtonStyle.Advanced"
+ android:contentDescription="@string/desc_op_sqrt"
+ android:onClick="onButtonClick"
+ android:text="@string/op_sqrt" />
+
+</com.android.calculator2.CalculatorPadLayout>
diff --git a/res/layout/pad_numeric.xml b/res/layout/pad_numeric.xml
new file mode 100644
index 0000000..c03f58b
--- /dev/null
+++ b/res/layout/pad_numeric.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.CalculatorPadLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/pad_numeric"
+ style="@style/PadLayoutStyle.Numeric"
+ android:background="@color/pad_numeric_background_color"
+ android:columnCount="3"
+ android:rowCount="4">
+
+ <Button
+ android:id="@+id/digit_7"
+ style="@style/PadButtonStyle.Numeric"
+ android:onClick="onButtonClick"
+ android:text="@string/digit_7" />
+
+ <Button
+ android:id="@+id/digit_8"
+ style="@style/PadButtonStyle.Numeric"
+ android:onClick="onButtonClick"
+ android:text="@string/digit_8" />
+
+ <Button
+ android:id="@+id/digit_9"
+ style="@style/PadButtonStyle.Numeric"
+ android:onClick="onButtonClick"
+ android:text="@string/digit_9" />
+
+ <Button
+ android:id="@+id/digit_4"
+ style="@style/PadButtonStyle.Numeric"
+ android:onClick="onButtonClick"
+ android:text="@string/digit_4" />
+
+ <Button
+ android:id="@+id/digit_5"
+ style="@style/PadButtonStyle.Numeric"
+ android:onClick="onButtonClick"
+ android:text="@string/digit_5" />
+
+ <Button
+ android:id="@+id/digit_6"
+ style="@style/PadButtonStyle.Numeric"
+ android:onClick="onButtonClick"
+ android:text="@string/digit_6" />
+
+ <Button
+ android:id="@+id/digit_1"
+ style="@style/PadButtonStyle.Numeric"
+ android:onClick="onButtonClick"
+ android:text="@string/digit_1" />
+
+ <Button
+ android:id="@+id/digit_2"
+ style="@style/PadButtonStyle.Numeric"
+ android:onClick="onButtonClick"
+ android:text="@string/digit_2" />
+
+ <Button
+ android:id="@+id/digit_3"
+ style="@style/PadButtonStyle.Numeric"
+ android:onClick="onButtonClick"
+ android:text="@string/digit_3" />
+
+ <Button
+ android:id="@+id/dec_point"
+ style="@style/PadButtonStyle.Numeric"
+ android:onClick="onButtonClick"
+ android:text="@string/dec_point" />
+
+ <Button
+ android:id="@+id/digit_0"
+ style="@style/PadButtonStyle.Numeric"
+ android:onClick="onButtonClick"
+ android:text="@string/digit_0" />
+
+ <Button
+ android:id="@+id/eq"
+ style="@style/PadButtonStyle.Numeric.Equals"
+ android:contentDescription="@string/desc_eq"
+ android:onClick="onButtonClick"
+ android:text="@string/eq" />
+
+</com.android.calculator2.CalculatorPadLayout>
diff --git a/res/layout/pad_operator_one_col.xml b/res/layout/pad_operator_one_col.xml
new file mode 100644
index 0000000..a794f72
--- /dev/null
+++ b/res/layout/pad_operator_one_col.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.CalculatorPadLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/pad_operator"
+ style="@style/PadLayoutStyle.Operator"
+ android:background="@color/pad_operator_background_color"
+ android:columnCount="1"
+ android:rowCount="5">
+
+ <Button
+ android:id="@+id/del"
+ style="@style/PadButtonStyle.Operator.Text"
+ android:contentDescription="@string/desc_del"
+ android:onClick="onButtonClick"
+ android:text="@string/del" />
+
+ <Button
+ android:id="@+id/clr"
+ style="@style/PadButtonStyle.Operator.Text"
+ android:contentDescription="@string/desc_clr"
+ android:onClick="onButtonClick"
+ android:text="@string/clr"
+ android:visibility="gone" />
+
+ <Button
+ android:id="@+id/op_div"
+ style="@style/PadButtonStyle.Operator"
+ android:contentDescription="@string/desc_op_div"
+ android:onClick="onButtonClick"
+ android:text="@string/op_div" />
+
+ <Button
+ android:id="@+id/op_mul"
+ style="@style/PadButtonStyle.Operator"
+ android:contentDescription="@string/desc_op_mul"
+ android:onClick="onButtonClick"
+ android:text="@string/op_mul" />
+
+ <Button
+ android:id="@+id/op_sub"
+ style="@style/PadButtonStyle.Operator"
+ android:contentDescription="@string/desc_op_sub"
+ android:onClick="onButtonClick"
+ android:text="@string/op_sub" />
+
+ <Button
+ android:id="@+id/op_add"
+ style="@style/PadButtonStyle.Operator"
+ android:contentDescription="@string/desc_op_add"
+ android:onClick="onButtonClick"
+ android:text="@string/op_add" />
+
+</com.android.calculator2.CalculatorPadLayout>
diff --git a/res/layout/pad_operator_two_col.xml b/res/layout/pad_operator_two_col.xml
new file mode 100644
index 0000000..6009e89
--- /dev/null
+++ b/res/layout/pad_operator_two_col.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.CalculatorPadLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/pad_operator"
+ style="@style/PadLayoutStyle.Operator"
+ android:background="@color/pad_operator_background_color"
+ android:columnCount="2"
+ android:rowCount="4">
+
+ <Button
+ android:id="@+id/op_div"
+ style="@style/PadButtonStyle.Operator"
+ android:contentDescription="@string/desc_op_div"
+ android:onClick="onButtonClick"
+ android:text="@string/op_div" />
+
+ <Button
+ android:id="@+id/del"
+ style="@style/PadButtonStyle.Operator.Text"
+ android:contentDescription="@string/desc_del"
+ android:onClick="onButtonClick"
+ android:text="@string/del" />
+
+ <Button
+ android:id="@+id/clr"
+ style="@style/PadButtonStyle.Operator.Text"
+ android:contentDescription="@string/desc_clr"
+ android:onClick="onButtonClick"
+ android:text="@string/clr"
+ android:visibility="gone" />
+
+ <Button
+ android:id="@+id/op_mul"
+ style="@style/PadButtonStyle.Operator"
+ android:contentDescription="@string/op_mul"
+ android:onClick="onButtonClick"
+ android:text="@string/op_mul" />
+
+ <Space style="@style/PadButtonStyle.Operator" />
+
+ <Button
+ android:id="@+id/op_sub"
+ style="@style/PadButtonStyle.Operator"
+ android:contentDescription="@string/desc_op_sub"
+ android:onClick="onButtonClick"
+ android:text="@string/op_sub" />
+
+ <Space style="@style/PadButtonStyle.Operator" />
+
+ <Button
+ android:id="@+id/op_add"
+ style="@style/PadButtonStyle.Operator"
+ android:contentDescription="@string/desc_op_add"
+ android:onClick="onButtonClick"
+ android:text="@string/op_add" />
+
+ <Button
+ android:id="@+id/eq"
+ style="@style/PadButtonStyle.Operator"
+ android:contentDescription="@string/desc_eq"
+ android:onClick="onButtonClick"
+ android:text="@string/eq" />
+
+</com.android.calculator2.CalculatorPadLayout>
diff --git a/res/values-land/arrays.xml b/res/values-land/arrays.xml
deleted file mode 100644
index 0046fe0..0000000
--- a/res/values-land/arrays.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2011, 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <array name="simple_buttons">
- <item>@+id/digit0</item>
- <item>@+id/digit1</item>
- <item>@+id/digit2</item>
- <item>@+id/digit3</item>
- <item>@+id/digit4</item>
- <item>@+id/digit5</item>
- <item>@+id/digit6</item>
- <item>@+id/digit7</item>
- <item>@+id/digit8</item>
- <item>@+id/digit9</item>
- <item>@+id/dot</item>
- <item>@+id/plus</item>
- <item>@+id/minus</item>
- <item>@+id/div</item>
- <item>@+id/mul</item>
- <item>@+id/equal</item>
- <item>@+id/leftParen</item>
- <item>@+id/rightParen</item>
- </array>
-
- <array name="advanced_buttons">
- <item>@+id/sin</item>
- <item>@+id/cos</item>
- <item>@+id/tan</item>
- <item>@+id/ln</item>
- <item>@+id/lg</item>
- <item>@+id/e</item>
- <item>@+id/pi</item>
- <item>@+id/power</item>
- <item>@+id/factorial</item>
- <item>@+id/sqrt</item>
- </array>
-
-</resources>
diff --git a/res/values-land/layout.xml b/res/values-land/layout.xml
new file mode 100644
index 0000000..8bc268c
--- /dev/null
+++ b/res/values-land/layout.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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>
+ <item name="activity_calculator" type="layout">@layout/activity_calculator_land</item>
+</resources> \ No newline at end of file
diff --git a/res/values-land/styles.xml b/res/values-land/styles.xml
new file mode 100644
index 0000000..f0c08bb
--- /dev/null
+++ b/res/values-land/styles.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+
+<!-- Styles for landscape phone (e.g. Nexus 4/5). -->
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <style name="DisplayEditTextStyle.Formula">
+ <item name="android:paddingTop">24dip</item>
+ <item name="android:paddingBottom">8dip</item>
+ <item name="android:paddingStart">16dip</item>
+ <item name="android:paddingEnd">16dip</item>
+ <item name="android:textSize">30sp</item>
+ </style>
+
+ <style name="DisplayEditTextStyle.Result">
+ <item name="android:paddingTop">8dip</item>
+ <item name="android:paddingBottom">24dip</item>
+ <item name="android:paddingStart">16dip</item>
+ <item name="android:paddingEnd">16dip</item>
+ <item name="android:textSize">30sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Advanced">
+ <item name="android:layout_marginTop">4dip</item>
+ <item name="android:layout_marginBottom">4dip</item>
+ <item name="android:layout_marginStart">8dip</item>
+ <item name="android:layout_marginEnd">8dip</item>
+ <item name="android:textColor">@color/pad_button_advanced_text_color</item>
+ <item name="android:textSize">15sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Numeric">
+ <item name="android:layout_margin">4dip</item>
+ <item name="android:textSize">23sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Numeric.Equals">
+ <item name="android:visibility">gone</item>
+ </style>
+
+ <style name="PadButtonStyle.Operator">
+ <item name="android:layout_marginTop">4dip</item>
+ <item name="android:layout_marginBottom">4dip</item>
+ <item name="android:layout_marginStart">8dip</item>
+ <item name="android:layout_marginEnd">8dip</item>
+ <item name="android:textSize">20sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Operator.Text">
+ <item name="android:textAllCaps">true</item>
+ <item name="android:textSize">15sp</item>
+ </style>
+
+ <style name="PadLayoutStyle.Advanced">
+ <item name="android:layout_width">0dip</item>
+ <item name="android:layout_weight">208</item>
+ <item name="android:paddingTop">4dip</item>
+ <item name="android:paddingBottom">4dip</item>
+ <item name="android:paddingStart">8dip</item>
+ <item name="android:paddingEnd">8dip</item>
+ <item name="android:columnCount">3</item>
+ <item name="android:rowCount">4</item>
+ </style>
+
+ <style name="PadLayoutStyle.Numeric">
+ <item name="android:layout_width">0dip</item>
+ <item name="android:layout_weight">240</item>
+ <item name="android:paddingTop">4dip</item>
+ <item name="android:paddingBottom">4dip</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">144</item>
+ <item name="android:paddingTop">4dip</item>
+ <item name="android:paddingBottom">4dip</item>
+ <item name="android:paddingStart">12dip</item>
+ <item name="android:paddingEnd">12dip</item>
+ </style>
+
+</resources>
diff --git a/res/values-port/arrays.xml b/res/values-port/arrays.xml
deleted file mode 100644
index 8bc888c..0000000
--- a/res/values-port/arrays.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2011, 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <array name="simple_buttons">
- <item>@+id/digit0</item>
- <item>@+id/digit1</item>
- <item>@+id/digit2</item>
- <item>@+id/digit3</item>
- <item>@+id/digit4</item>
- <item>@+id/digit5</item>
- <item>@+id/digit6</item>
- <item>@+id/digit7</item>
- <item>@+id/digit8</item>
- <item>@+id/digit9</item>
- <item>@+id/dot</item>
- <item>@+id/plus</item>
- <item>@+id/minus</item>
- <item>@+id/div</item>
- <item>@+id/mul</item>
- <item>@+id/equal</item>
- </array>
-
- <array name="advanced_buttons">
- <item>@+id/leftParen</item>
- <item>@+id/rightParen</item>
- <item>@+id/sin</item>
- <item>@+id/cos</item>
- <item>@+id/tan</item>
- <item>@+id/ln</item>
- <item>@+id/lg</item>
- <item>@+id/e</item>
- <item>@+id/pi</item>
- <item>@+id/power</item>
- <item>@+id/factorial</item>
- <item>@+id/sqrt</item>
- </array>
-
-</resources> \ No newline at end of file
diff --git a/res/values-port/dimens.xml b/res/values-port/dimens.xml
new file mode 100644
index 0000000..bf71f71
--- /dev/null
+++ b/res/values-port/dimens.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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>
+
+ <!-- The margin between the pad pages when displayed using a view pager. -->
+ <dimen name="pad_page_margin">-32dip</dimen>
+
+</resources>
diff --git a/res/values-port/layout.xml b/res/values-port/layout.xml
new file mode 100644
index 0000000..99ea0b8
--- /dev/null
+++ b/res/values-port/layout.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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>
+ <item name="activity_calculator" type="layout">@layout/activity_calculator_port</item>
+</resources> \ No newline at end of file
diff --git a/res/values-port/styles.xml b/res/values-port/styles.xml
new file mode 100644
index 0000000..b998d62
--- /dev/null
+++ b/res/values-port/styles.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+
+<!-- Styles for portrait phone (e.g. Nexus 4/5). -->
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <style name="DisplayEditTextStyle.Formula">
+ <item name="android:paddingTop">48dip</item>
+ <item name="android:paddingBottom">24dip</item>
+ <item name="android:paddingStart">16dip</item>
+ <item name="android:paddingEnd">16dip</item>
+ <item name="minTextSize">36sp</item>
+ <item name="maxTextSize">64sp</item>
+ <item name="stepTextSize">8sp</item>
+ </style>
+
+ <style name="DisplayEditTextStyle.Result">
+ <item name="android:paddingTop">24dip</item>
+ <item name="android:paddingBottom">48dip</item>
+ <item name="android:paddingStart">16dip</item>
+ <item name="android:paddingEnd">16dip</item>
+ <item name="android:textSize">36sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Advanced">
+ <item name="android:layout_margin">4dip</item>
+ <item name="android:textColor">@color/pad_button_advanced_text_color</item>
+ <item name="android:textSize">20sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Numeric">
+ <item name="android:layout_margin">4dip</item>
+ <item name="android:textSize">32sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Numeric.Equals">
+ <item name="android:visibility">visible</item>
+ </style>
+
+ <style name="PadButtonStyle.Operator">
+ <item name="android:layout_margin">8dip</item>
+ <item name="android:textSize">23sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Operator.Text">
+ <item name="android:textAllCaps">true</item>
+ <item name="android:textSize">15sp</item>
+ </style>
+
+ <style name="PadLayoutStyle.Advanced">
+ <item name="android:paddingTop">12dip</item>
+ <item name="android:paddingBottom">20dip</item>
+ <item name="android:paddingStart">20dip</item>
+ <item name="android:paddingEnd">20dip</item>
+ <item name="android:columnCount">3</item>
+ <item name="android:rowCount">4</item>
+ </style>
+
+ <style name="PadLayoutStyle.Numeric">
+ <item name="android:layout_width">0dip</item>
+ <item name="android:layout_weight">264</item>
+ <item name="android:paddingTop">12dip</item>
+ <item name="android:paddingBottom">20dip</item>
+ <item name="android:paddingStart">12dip</item>
+ <item name="android:paddingEnd">12dip</item>
+ </style>
+
+ <style name="PadLayoutStyle.Operator">
+ <item name="android:layout_width">0dip</item>
+ <item name="android:layout_weight">96</item>
+ <item name="android:paddingTop">8dip</item>
+ <item name="android:paddingBottom">24dip</item>
+ <item name="android:paddingStart">8dip</item>
+ <item name="android:paddingEnd">24dip</item>
+ </style>
+
+ <style name="PadPageShadow">
+ <item name="android:layout_width">8dip</item>
+ <item name="android:layout_height">match_parent</item>
+ <item name="android:background">@drawable/pad_page_shadow</item>
+ </style>
+
+</resources> \ No newline at end of file
diff --git a/res/values-sw600dp-land/styles.xml b/res/values-sw600dp-land/styles.xml
new file mode 100644
index 0000000..7de1e8a
--- /dev/null
+++ b/res/values-sw600dp-land/styles.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+
+<!-- Styles for landscape 600dip-wide tablet (e.g. Nexus 7). -->
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <style name="DisplayEditTextStyle.Formula">
+ <item name="android:paddingTop">72dip</item>
+ <item name="android:paddingBottom">26dip</item>
+ <item name="android:paddingStart">44dip</item>
+ <item name="android:paddingEnd">44dip</item>
+ <item name="minTextSize">48sp</item>
+ <item name="maxTextSize">80sp</item>
+ <item name="stepTextSize">8sp</item>
+ </style>
+
+ <style name="DisplayEditTextStyle.Result">
+ <item name="android:paddingTop">26dip</item>
+ <item name="android:paddingBottom">46dip</item>
+ <item name="android:paddingStart">44dip</item>
+ <item name="android:paddingEnd">44dip</item>
+ <item name="android:textSize">48sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Advanced">
+ <item name="android:layout_margin">6dip</item>
+ <item name="android:textColor">@color/pad_button_advanced_text_color</item>
+ <item name="android:textSize">27sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Numeric">
+ <item name="android:layout_margin">6dip</item>
+ <item name="android:textSize">36sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Numeric.Equals">
+ <item name="android:visibility">gone</item>
+ </style>
+
+ <style name="PadButtonStyle.Operator">
+ <item name="android:layout_margin">6dip</item>
+ <item name="android:textSize">36sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Operator.Text">
+ <item name="android:textAllCaps">true</item>
+ <item name="android:textSize">24sp</item>
+ </style>
+
+ <style name="PadLayoutStyle.Advanced">
+ <item name="android:layout_width">0dip</item>
+ <item name="android:layout_weight">508</item>
+ <item name="android:paddingTop">10dip</item>
+ <item name="android:paddingBottom">10dip</item>
+ <item name="android:paddingStart">18dip</item>
+ <item name="android:paddingEnd">22dip</item>
+ <item name="android:columnCount">3</item>
+ <item name="android:rowCount">4</item>
+ </style>
+
+ <style name="PadLayoutStyle.Numeric">
+ <item name="android:layout_width">0dip</item>
+ <item name="android:layout_weight">532</item>
+ <item name="android:paddingTop">10dip</item>
+ <item name="android:paddingBottom">10dip</item>
+ <item name="android:paddingStart">22dip</item>
+ <item name="android:paddingEnd">18dip</item>
+ </style>
+
+ <style name="PadLayoutStyle.Operator">
+ <item name="android:layout_width">0dip</item>
+ <item name="android:layout_weight">240</item>
+ <item name="android:paddingTop">10dip</item>
+ <item name="android:paddingBottom">10dip</item>
+ <item name="android:paddingStart">18dip</item>
+ <item name="android:paddingEnd">18dip</item>
+ </style>
+
+</resources>
diff --git a/res/values-sw600dp-port/dimens.xml b/res/values-sw600dp-port/dimens.xml
deleted file mode 100644
index 799f6fe..0000000
--- a/res/values-sw600dp-port/dimens.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 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>
- <dimen name="group_padding">48sp</dimen>
-</resources>
diff --git a/res/values-sw600dp-port/layout.xml b/res/values-sw600dp-port/layout.xml
new file mode 100644
index 0000000..46d71cb
--- /dev/null
+++ b/res/values-sw600dp-port/layout.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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>
+ <item name="activity_calculator" type="layout">@layout/activity_calculator_tablet_port</item>
+</resources> \ No newline at end of file
diff --git a/res/values-sw600dp-port/styles.xml b/res/values-sw600dp-port/styles.xml
new file mode 100644
index 0000000..3a4c188
--- /dev/null
+++ b/res/values-sw600dp-port/styles.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+
+
+<!-- Styles for portrait 600dip-wide tablet (e.g. Nexus 7). -->
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <style name="DisplayEditTextStyle.Formula">
+ <item name="android:paddingTop">72dip</item>
+ <item name="android:paddingBottom">32dip</item>
+ <item name="android:paddingStart">44dip</item>
+ <item name="android:paddingEnd">44dip</item>
+ <item name="minTextSize">48sp</item>
+ <item name="maxTextSize">80sp</item>
+ <item name="stepTextSize">8sp</item>
+ </style>
+
+ <style name="DisplayEditTextStyle.Result">
+ <item name="android:paddingTop">32dip</item>
+ <item name="android:paddingBottom">90dip</item>
+ <item name="android:paddingStart">44dip</item>
+ <item name="android:paddingEnd">44dip</item>
+ <item name="android:textSize">48sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Advanced">
+ <item name="android:layout_marginTop">8dip</item>
+ <item name="android:layout_marginBottom">8dip</item>
+ <item name="android:layout_marginStart">12dip</item>
+ <item name="android:layout_marginEnd">12dip</item>
+ <item name="android:textColor">@color/pad_button_advanced_text_color</item>
+ <item name="android:textSize">27sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Numeric">
+ <item name="android:layout_margin">8dip</item>
+ <item name="android:textSize">36sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Numeric.Equals">
+ <item name="android:visibility">gone</item>
+ </style>
+
+ <style name="PadButtonStyle.Operator">
+ <item name="android:layout_marginTop">8dip</item>
+ <item name="android:layout_marginBottom">8dip</item>
+ <item name="android:layout_marginStart">16dip</item>
+ <item name="android:layout_marginEnd">16dip</item>
+ <item name="android:textSize">36sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Operator.Text">
+ <item name="android:textAllCaps">true</item>
+ <item name="android:textSize">24sp</item>
+ </style>
+
+ <style name="PadLayoutStyle.Advanced">
+ <item name="android:layout_height">0dip</item>
+ <item name="android:layout_weight">256</item>
+ <item name="android:paddingTop">8dip</item>
+ <item name="android:paddingBottom">8dip</item>
+ <item name="android:paddingStart">16dip</item>
+ <item name="android:paddingEnd">16dip</item>
+ <item name="android:columnCount">6</item>
+ <item name="android:rowCount">2</item>
+ </style>
+
+ <style name="PadLayoutStyle.Numeric">
+ <item name="android:layout_width">0dip</item>
+ <item name="android:layout_weight">532</item>
+ <item name="android:paddingTop">8dip</item>
+ <item name="android:paddingBottom">8dip</item>
+ <item name="android:paddingStart">16dip</item>
+ <item name="android:paddingEnd">16dip</item>
+ </style>
+
+ <style name="PadLayoutStyle.Operator">
+ <item name="android:layout_width">0dip</item>
+ <item name="android:layout_weight">240</item>
+ <item name="android:paddingTop">8dip</item>
+ <item name="android:paddingBottom">8dip</item>
+ <item name="android:paddingStart">0dip</item>
+ <item name="android:paddingEnd">8dip</item>
+ </style>
+
+ <style name="PadLinearLayoutStyle">
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">0dip</item>
+ <item name="android:layout_weight">508</item>
+ </style>
+
+</resources>
diff --git a/res/values-sw600dp/arrays.xml b/res/values-sw600dp/arrays.xml
deleted file mode 100644
index 219b3e5..0000000
--- a/res/values-sw600dp/arrays.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2011, 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <array name="buttons">
- <item>@+id/digit0</item>
- <item>@+id/digit1</item>
- <item>@+id/digit2</item>
- <item>@+id/digit3</item>
- <item>@+id/digit4</item>
- <item>@+id/digit5</item>
- <item>@+id/digit6</item>
- <item>@+id/digit7</item>
- <item>@+id/digit8</item>
- <item>@+id/digit9</item>
- <item>@+id/dot</item>
- <item>@+id/plus</item>
- <item>@+id/minus</item>
- <item>@+id/div</item>
- <item>@+id/mul</item>
- <item>@+id/equal</item>
- <item>@+id/leftParen</item>
- <item>@+id/rightParen</item>
- <item>@+id/sin</item>
- <item>@+id/cos</item>
- <item>@+id/tan</item>
- <item>@+id/ln</item>
- <item>@+id/lg</item>
- <item>@+id/e</item>
- <item>@+id/pi</item>
- <item>@+id/power</item>
- <item>@+id/factorial</item>
- <item>@+id/sqrt</item>
- </array>
-
-</resources> \ No newline at end of file
diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml
deleted file mode 100644
index ec548bb..0000000
--- a/res/values-sw600dp/dimens.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 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>
- <dimen name="btn_digit_text_size">50sp</dimen>
- <dimen name="btn_operation_text_size">50sp</dimen>
- <dimen name="btn_function_text_size">25sp</dimen>
- <dimen name="btn_clear_text_size">40sp</dimen>
-
- <dimen name="left_right_padding">16sp</dimen>
- <dimen name="top_bottom_padding">16sp</dimen>
- <dimen name="group_padding">16sp</dimen>
-</resources>
diff --git a/res/values-sw800dp-land/dimens.xml b/res/values-sw800dp-land/dimens.xml
deleted file mode 100644
index 9d1c26c..0000000
--- a/res/values-sw800dp-land/dimens.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 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>
- <dimen name="left_right_padding">48sp</dimen>
- <dimen name="top_bottom_padding">48sp</dimen>
- <dimen name="group_padding">48sp</dimen>
-</resources>
diff --git a/res/values-sw800dp-land/styles.xml b/res/values-sw800dp-land/styles.xml
new file mode 100644
index 0000000..da69230
--- /dev/null
+++ b/res/values-sw800dp-land/styles.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+
+<!-- Styles for landscape 800dip-wide tablet (e.g. Nexus 10). -->
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <style name="DisplayEditTextStyle.Formula">
+ <item name="android:paddingTop">72dip</item>
+ <item name="android:paddingBottom">26dip</item>
+ <item name="android:paddingStart">44dip</item>
+ <item name="android:paddingEnd">44dip</item>
+ <item name="minTextSize">56sp</item>
+ <item name="maxTextSize">96sp</item>
+ <item name="stepTextSize">8sp</item>
+ </style>
+
+ <style name="DisplayEditTextStyle.Result">
+ <item name="android:paddingTop">26dip</item>
+ <item name="android:paddingBottom">46dip</item>
+ <item name="android:paddingStart">44dip</item>
+ <item name="android:paddingEnd">44dip</item>
+ <item name="android:textSize">56sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Advanced">
+ <item name="android:layout_margin">6dip</item>
+ <item name="android:textColor">@color/pad_button_advanced_text_color</item>
+ <item name="android:textSize">36sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Numeric">
+ <item name="android:layout_margin">6dip</item>
+ <item name="android:textSize">48sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Numeric.Equals">
+ <item name="android:visibility">gone</item>
+ </style>
+
+ <style name="PadButtonStyle.Operator">
+ <item name="android:layout_margin">6dip</item>
+ <item name="android:textSize">48sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Operator.Text">
+ <item name="android:textAllCaps">true</item>
+ <item name="android:textSize">32sp</item>
+ </style>
+
+ <style name="PadLayoutStyle.Advanced">
+ <item name="android:layout_width">0dip</item>
+ <item name="android:layout_weight">508</item>
+ <item name="android:paddingTop">10dip</item>
+ <item name="android:paddingBottom">10dip</item>
+ <item name="android:paddingStart">18dip</item>
+ <item name="android:paddingEnd">22dip</item>
+ <item name="android:columnCount">3</item>
+ <item name="android:rowCount">4</item>
+ </style>
+
+ <style name="PadLayoutStyle.Numeric">
+ <item name="android:layout_width">0dip</item>
+ <item name="android:layout_weight">532</item>
+ <item name="android:paddingTop">10dip</item>
+ <item name="android:paddingBottom">10dip</item>
+ <item name="android:paddingStart">22dip</item>
+ <item name="android:paddingEnd">18dip</item>
+ </style>
+
+ <style name="PadLayoutStyle.Operator">
+ <item name="android:layout_width">0dip</item>
+ <item name="android:layout_weight">240</item>
+ <item name="android:paddingTop">10dip</item>
+ <item name="android:paddingBottom">10dip</item>
+ <item name="android:paddingStart">18dip</item>
+ <item name="android:paddingEnd">18dip</item>
+ </style>
+
+</resources>
diff --git a/res/values-sw800dp-port/dimens.xml b/res/values-sw800dp-port/dimens.xml
deleted file mode 100644
index a6b181e..0000000
--- a/res/values-sw800dp-port/dimens.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 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>
- <dimen name="left_right_padding">32sp</dimen>
- <dimen name="top_bottom_padding">64sp</dimen>
- <dimen name="group_padding">72sp</dimen>
-</resources>
diff --git a/res/values-sw800dp-port/layout.xml b/res/values-sw800dp-port/layout.xml
new file mode 100644
index 0000000..46d71cb
--- /dev/null
+++ b/res/values-sw800dp-port/layout.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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>
+ <item name="activity_calculator" type="layout">@layout/activity_calculator_tablet_port</item>
+</resources> \ No newline at end of file
diff --git a/res/values-sw800dp-port/styles.xml b/res/values-sw800dp-port/styles.xml
new file mode 100644
index 0000000..9b7475a
--- /dev/null
+++ b/res/values-sw800dp-port/styles.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+
+<!-- Styles for portrait 800dip-wide tablet (e.g. Nexus 10). -->
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <style name="DisplayEditTextStyle.Formula">
+ <item name="android:paddingTop">72dip</item>
+ <item name="android:paddingBottom">32dip</item>
+ <item name="android:paddingStart">44dip</item>
+ <item name="android:paddingEnd">44dip</item>
+ <item name="minTextSize">56sp</item>
+ <item name="maxTextSize">96sp</item>
+ <item name="stepTextSize">8sp</item>
+ </style>
+
+ <style name="DisplayEditTextStyle.Result">
+ <item name="android:paddingTop">32dip</item>
+ <item name="android:paddingBottom">90dip</item>
+ <item name="android:paddingStart">44dip</item>
+ <item name="android:paddingEnd">44dip</item>
+ <item name="android:textSize">56sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Advanced">
+ <item name="android:layout_marginTop">8dip</item>
+ <item name="android:layout_marginBottom">8dip</item>
+ <item name="android:layout_marginStart">12dip</item>
+ <item name="android:layout_marginEnd">12dip</item>
+ <item name="android:textColor">@color/pad_button_advanced_text_color</item>
+ <item name="android:textSize">36sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Numeric">
+ <item name="android:layout_margin">8dip</item>
+ <item name="android:textSize">48sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Numeric.Equals">
+ <item name="android:visibility">gone</item>
+ </style>
+
+ <style name="PadButtonStyle.Operator">
+ <item name="android:layout_marginTop">8dip</item>
+ <item name="android:layout_marginBottom">8dip</item>
+ <item name="android:layout_marginStart">16dip</item>
+ <item name="android:layout_marginEnd">16dip</item>
+ <item name="android:textSize">48sp</item>
+ </style>
+
+ <style name="PadButtonStyle.Operator.Text">
+ <item name="android:textAllCaps">true</item>
+ <item name="android:textSize">32sp</item>
+ </style>
+
+ <style name="PadLayoutStyle.Advanced">
+ <item name="android:layout_height">0dip</item>
+ <item name="android:layout_weight">256</item>
+ <item name="android:paddingTop">8dip</item>
+ <item name="android:paddingBottom">8dip</item>
+ <item name="android:paddingStart">16dip</item>
+ <item name="android:paddingEnd">16dip</item>
+ <item name="android:columnCount">6</item>
+ <item name="android:rowCount">2</item>
+ </style>
+
+ <style name="PadLayoutStyle.Numeric">
+ <item name="android:layout_width">0dip</item>
+ <item name="android:layout_weight">532</item>
+ <item name="android:paddingTop">8dip</item>
+ <item name="android:paddingBottom">8dip</item>
+ <item name="android:paddingStart">16dip</item>
+ <item name="android:paddingEnd">16dip</item>
+ </style>
+
+ <style name="PadLayoutStyle.Operator">
+ <item name="android:layout_width">0dip</item>
+ <item name="android:layout_weight">240</item>
+ <item name="android:paddingTop">8dip</item>
+ <item name="android:paddingBottom">8dip</item>
+ <item name="android:paddingStart">0dip</item>
+ <item name="android:paddingEnd">8dip</item>
+ </style>
+
+ <style name="PadLinearLayoutStyle">
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">0dip</item>
+ <item name="android:layout_weight">508</item>
+ </style>
+
+</resources>
diff --git a/res/values-sw800dp/dimens.xml b/res/values-sw800dp/dimens.xml
deleted file mode 100644
index 7bd649f..0000000
--- a/res/values-sw800dp/dimens.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 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>
- <dimen name="btn_digit_text_size">64sp</dimen>
- <dimen name="btn_operation_text_size">64sp</dimen>
- <dimen name="btn_function_text_size">32sp</dimen>
- <dimen name="btn_clear_text_size">48sp</dimen>
-</resources>
diff --git a/res/values/attr.xml b/res/values/attr.xml
new file mode 100644
index 0000000..5043663
--- /dev/null
+++ b/res/values/attr.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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">
+
+ <declare-styleable name="CalculatorEditText">
+ <attr name="minTextSize" format="dimension" />
+ <attr name="maxTextSize" format="dimension" />
+ <attr name="stepTextSize" format="dimension" />
+ </declare-styleable>
+
+</resources>
diff --git a/res/values/color.xml b/res/values/color.xml
new file mode 100644
index 0000000..488f3ad
--- /dev/null
+++ b/res/values/color.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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>
+
+ <!-- Default background color for the status bar. -->
+ <color name="calculator_accent_color">#00BCD4</color>
+
+ <!-- Color to indicate an error has occured. -->
+ <color name="calculator_error_color">#F40056</color>
+
+ <!-- Background color of the calculator display. -->
+ <color name="display_background_color">#FFF</color>
+
+ <!-- Text color for the formula in the calculator display. -->
+ <color name="display_formula_text_color">#AAA</color>
+
+ <!-- Text color for the result in the calculator display. -->
+ <color name="display_result_text_color">#CCC</color>
+
+ <!-- Background color for the numeric pad. -->
+ <color name="pad_numeric_background_color">#434343</color>
+
+ <!-- Background color for the operator pad. -->
+ <color name="pad_operator_background_color">#636363</color>
+
+ <!-- Background color for the advanced pad. -->
+ <color name="pad_advanced_background_color">#1DE9B6</color>
+
+ <!-- Text color for a button in a pad. -->
+ <color name="pad_button_text_color">#FFF</color>
+
+ <!-- Text color for a button in the advanced pad. -->
+ <color name="pad_button_advanced_text_color">#85000000</color>
+
+ <!-- Tint color when a button is pressed in a pad. -->
+ <color name="pad_button_tint_color">#80CCCCCC</color>
+
+</resources> \ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
deleted file mode 100644
index 3eaf995..0000000
--- a/res/values/colors.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 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>
- <color name="magic_flame">#00ffffff</color>
-
- <color name="accent">#18FFFF</color>
-
- <color name="primary_light">#B3E5FC</color>
- <color name="primary">#03A9F4</color>
- <color name="primary_dark">#0288D1</color>
-
- <color name="gray_80">#CCCCCC</color>
- <color name="gray_70">#B3B3B3</color>
- <color name="gray_60">#999999</color>
- <color name="gray_50">#808080</color>
- <color name="gray_40">#666666</color>
- <color name="gray_30">#4D4D4D</color>
- <color name="gray_20">#333333</color>
-
- <color name="white">#FFFFFF</color>
- <color name="black">#000000</color>
-
- <color name="text_light">#B3FFFFFF</color>
- <color name="text_dark">#B3000000</color>
-</resources>
diff --git a/res/values/constants.xml b/res/values/constants.xml
deleted file mode 100644
index 98c14ec..0000000
--- a/res/values/constants.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 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>
- <integer name="max_digits">14</integer>
-</resources> \ No newline at end of file
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
deleted file mode 100644
index 74a949b..0000000
--- a/res/values/dimens.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-
- <dimen name="btn_digit_text_size">40sp</dimen>
- <dimen name="btn_operation_text_size">40sp</dimen>
- <dimen name="btn_function_text_size">30sp</dimen>
- <dimen name="btn_clear_text_size">30sp</dimen>
- <dimen name="small_text_size">16dp</dimen>
- <dimen name="pager_shadow_width">16dp</dimen>
- <dimen name="activity_horizontal_margin">16dp</dimen>
- <dimen name="activity_vertical_margin">16dp</dimen>
-
- <!-- 72 = 16 + 8N -->
- <dimen name="display_maximum_text_size">72sp</dimen>
- <dimen name="display_minimum_text_size">16sp</dimen>
- <dimen name="display_step_text_size">8sp</dimen>
-
-</resources>
diff --git a/res/values/donottranslate_strings.xml b/res/values/donottranslate_strings.xml
new file mode 100644
index 0000000..69d2959
--- /dev/null
+++ b/res/values/donottranslate_strings.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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>
+
+ <!-- Constant for Euler's number (i.e. "2.7182…"). [CHAR_LIMIT=1] -->
+ <string name="const_e">e</string>
+ <!-- Constant for pi (i.e. "3.1415…"). [CHAR_LIMIT=1] -->
+ <string name="const_pi">π</string>
+
+ <!-- Left parenthesis (e.g. "log(", "2 × (3 - 1)". [CHAR_LIMIT=1] -->
+ <string name="lparen">(</string>
+ <!-- Right parenthesis (e.g. "log(2)", "(3 - 1) × 2". [CHAR_LIMIT=1] -->
+ <string name="rparen">)</string>
+
+ <!-- Addition operator (e.g. "1 + 2"). [CHAR_LIMIT=1] -->
+ <string name="op_add">+</string>
+ <!-- Divide operator (e.g. "1 ÷ 2"). [CHAR_LIMIT=1] -->
+ <string name="op_div">÷</string>
+ <!-- Factorial operator (e.g. "2!"). [CHAR_LIMIT=1] -->
+ <string name="op_fact">!</string>
+ <!-- Multiply operator (e.g. "1 × 2"). [CHAR_LIMIT=1] -->
+ <string name="op_mul">×</string>
+ <!-- Power operator (e.g. "1 ^ 2"). [CHAR_LIMIT=1] -->
+ <string name="op_pow">^</string>
+ <!-- Square root operator (e.g. "√1"). [CHAR_LIMIT=1] -->
+ <string name="op_sqrt">√</string>
+ <!-- Subtraction operator (e.g. "1 - 2"). [CHAR_LIMIT=1] -->
+ <string name="op_sub">−</string>
+
+ <!-- Equals operator (e.g. "1 + 2 = ?"). [CHAR_LIMIT=1] -->
+ <string name="eq">=</string>
+ <!-- Result displayed when expression evaluates to infinity. [CHAR_LIMIT=1] -->
+ <string name="inf">∞</string>
+
+</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index b1c990a..bcdd55e 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1,202 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (C) 2007 The Android Open Source Project
+ Copyright (C) 2014 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
+ 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
+ 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.
--->
+ 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>
- <!-- Application name -->
+ <!-- Name of the application. [CHAR_LIMIT=NONE] -->
<string name="app_name">Calculator</string>
- <!-- If there is a syntax error in the user entered calculation, an error dialog will appear. This is the title. -->
- <string name="error">Error</string>
- <!-- Displayed numbers for the digit buttons -->
- <string name="digit0">0</string>
- <!-- Displayed numbers for the digit buttons -->
- <string name="digit1">1</string>
- <!-- Displayed numbers for the digit buttons -->
- <string name="digit2">2</string>
- <!-- Displayed numbers for the digit buttons -->
- <string name="digit3">3</string>
- <!-- Displayed numbers for the digit buttons -->
- <string name="digit4">4</string>
- <!-- Displayed numbers for the digit buttons -->
- <string name="digit5">5</string>
- <!-- Displayed numbers for the digit buttons -->
- <string name="digit6">6</string>
- <!-- Displayed numbers for the digit buttons -->
- <string name="digit7">7</string>
- <!-- Displayed numbers for the digit buttons -->
- <string name="digit8">8</string>
- <!-- Displayed numbers for the digit buttons -->
- <string name="digit9">9</string>
- <!-- Button name on screen to delete the last entered digit or operator -->
- <string name="del">DEL</string>
- <!-- Button name on screen to clear the entire calculation field. [CHAR LIMIT=6] -->
- <string name="clear">CLR</string>
- <!-- Do not translate. Unicode division sign; don't translate. Displayed as button on screen. -->
- <string name="div">\u00f7</string>
- <!-- Do not translate. Unicode multiplication sign; don't translate. Displayed as button on screen. -->
- <string name="mul">\u00d7</string>
- <!-- Do not translate. Plus sign, displayed as button on screen -->
- <string name="plus">+</string>
- <!-- Do not translate. Unicode minus sign; don't translate. Displayed as button on screen. -->
- <string name="minus">\u2212</string>
- <!-- Do not translate. Decimal point; don't translate. Displayed as button on screen. -->
- <string name="dot">.</string>
- <!-- Do not translate. Equal sign; don't translate. Displayed as button on screen. -->
- <string name="equal">=</string>
- <!-- Do not translate. Down arrow; don't translate. Displayed as button on screen. -->
- <string name="enter">\u2193</string>
- <!-- Displayed on buttons on screen for the sin function. -->
- <string name="sin">sin</string>
- <!-- Do not translate. What we replace translated SIN with for calculating sin. -->
- <string name="sin_mathematical_value" translate="false">sin</string>
- <!-- Displayed on buttons on screen for the cos function. -->
- <string name="cos">cos</string>
- <!-- Do not translate. What we replace translated COS with for calculating cos. -->
- <string name="cos_mathematical_value" translate="false">cos</string>
- <!-- Displayed on buttons on screen for the tan function. -->
- <string name="tan">tan</string>
- <!-- Do not translate. What we replace translated TAN with for calculating tan. -->
- <string name="tan_mathematical_value" translate="false">tan</string>
- <!-- Do not translate. Unicode pi sign; don't translate. Displayed as button on screen. -->
- <string name="pi">\u03c0</string>
- <!-- Displayed on buttons on screen for the e function. -->
- <string name="e">e</string>
- <!-- Do not translate. What we replace translated e with for calculating e. -->
- <string name="e_mathematical_value" translate="false">e</string>
- <!-- Displayed on buttons on screen for the ln function. -->
- <string name="ln">ln</string>
- <!-- Do not translate. What we replace translated ln with for calculating ln. -->
- <string name="ln_mathematical_value" translate="false">ln</string>
- <!-- Displayed on buttons on screen for the log function. -->
- <string name="lg">log</string>
- <!-- Do not translate. What we replace translated lg with for calculating lg. -->
- <string name="lg_mathematical_value" translate="false">lg</string>
- <!-- Displayed on buttons on screen for a left parenthesis. -->
- <string name="leftParen">(</string>
- <!-- Displayed on buttons on screen for a right parenthesis. -->
- <string name="rightParen">)</string>
- <!-- Do not translate. Unicode square root sign; don't translate. Displayed on button on screen. -->
- <string name="sqrt">\u221a</string>
- <!-- Do not translate. Displayed on buttons on screen. -->
- <string name="power">^</string>
- <!-- Do not translate. -->
- <string name="factorial">!</string>
- <!-- Menu item text to take user to the screen with the basic digits and operators. -->
- <string name="basic">Basic panel</string>
- <!-- Menu item text to take user to the screen with the advanced functions, such as sin, cos, ln, log, etc. -->
- <string name="advanced">Advanced panel</string>
- <!-- Menu item text to clear the calculation history. -->
- <string name="clear_history">Clear history</string>
- <!-- Toast shown when text is copied to the clipboard. -->
- <string name="text_copied_toast">Text copied.</string>
-
- <!--
- Content descriptions for accessibility. These strings will be read aloud to users who are using the calculator with
- accessibility features enabled and should reflect the mathematical concept instead of a direct representation of what is shown
- on the button
- -->
- <string name="leftParenDesc">left parenthesis</string>
- <string name="rightParenDesc">right parenthesis</string>
- <string name="factorialDesc">factorial</string>
- <string name="lnDesc">natural logarithm</string>
- <string name="lgDesc">logarithm</string>
- <string name="sqrtDesc">square root</string>
- <string name="divDesc">divide</string>
- <string name="mulDesc">multiply</string>
- <string name="plusDesc">plus</string>
- <string name="minusDesc">minus</string>
- <string name="dotDesc">point</string>
- <string name="powerDesc">power</string>
- <string name="delDesc">delete</string>
- <string name="clearDesc">clear</string>
- <string name="tanDesc">tangent</string>
- <string name="sinDesc">sine</string>
- <string name="cosDesc">cosine</string>
- <string name="eDesc">Euler\'s number</string>
- <string name="piDesc">pi</string>
- <string name="equalDesc">equals</string>
-
- <!--
- Content descriptions for accessibility used as keys when determining which mathematical
- concept description to speak when accessibility features are enabled. Order of the array is
- important.
- -->
- <string-array name="operators" translatable="false">
- <item>(</item>
- <item>)</item>
- <item>!</item>
- <item>ln</item>
- <item>log</item>
- <item>\u221a</item>
- <item>\u00f7</item>
- <item>\u00d7</item>
- <item>+</item>
- <item>\u2212</item>
- <item>.</item>
- <item>^</item>
- <item>tan</item>
- <item>sin</item>
- <item>cos</item>
- <item>\u03c0</item>
- <item>=</item>
- </string-array>
-
- <!--
- Content descriptions for accessibility. These strings will be read aloud to users who
- are using the calculator with accessibility features enabled and hover over the edit text
- field. These should reflect the mathematical concept instead of a direct representation of
- what is shown in the text field. Order of the array is important.
- -->
- <string-array name="operatorDescs">
-
- <!-- Description for mathematical ( [CHAR LIMIT=200] -->
- <item>left parenthesis</item>
- <!-- Description for mathematical ) [CHAR LIMIT=200] -->
- <item>right parenthesis</item>
- <!-- Description for mathematical ! (factorial) function [CHAR LIMIT=200] -->
- <item>factorial</item>
- <!-- Description for mathematical ln [CHAR LIMIT=200] -->
- <item>natural logarithm</item>
- <!-- Description for mathematical log [CHAR LIMIT=200] -->
- <item>logarithm</item>
- <!-- Description for mathematical square root [CHAR LIMIT=200] -->
- <item>square root</item>
- <!-- Description for mathematical / [CHAR LIMIT=200] -->
- <item>divided by</item>
- <!-- Description for mathematical x [CHAR LIMIT=200] -->
- <item>multiplied by</item>
- <!-- Description for mathematical + [CHAR LIMIT=200] -->
- <item>plus</item>
- <!-- Description for mathematical - [CHAR LIMIT=200] -->
- <item>minus</item>
- <!-- Description for mathematical . [CHAR LIMIT=200] -->
- <item>&#160;point&#160;</item>
- <!-- Description for mathematical ^ [CHAR LIMIT=200] -->
- <item>power</item>
- <!-- Description for mathematical TAN [CHAR LIMIT=200] -->
- <item>tangent</item>
- <!-- Description for mathematical SIN [CHAR LIMIT=200] -->
- <item>sine</item>
- <!-- Description for mathematical COS [CHAR LIMIT=200] -->
- <item>cosine</item>
- <!-- Description for mathematical PI [CHAR LIMIT=200] -->
- <item>pi</item>
- <!-- Description for mathematical = [CHAR LIMIT=200] -->
- <item>equals</item>
- </string-array>
+
+ <!-- Error displayed when expression evaluates to NaN. [CHAR_LIMIT=14] -->
+ <string name="error_nan">Not a number</string>
+ <!-- Error displayed when expression contains a syntax error. [CHAR_LIMIT=14] -->
+ <string name="error_syntax">Error</string>
+
+ <!-- Decimal separator (e.g. "1.23"). [CHAR_LIMIT=1] -->
+ <string name="dec_point">.</string>
+
+ <!-- Decimal representation of zero (e.g. "0", "10", "1.0", "1e0"). [CHAR_LIMIT=1] -->
+ <string name="digit_0">0</string>
+ <!-- Decimal representation of one (e.g. "1", "11", "1.1", "1e1"). [CHAR_LIMIT=1] -->
+ <string name="digit_1">1</string>
+ <!-- Decimal representation of two (e.g. "2", "22", "2.2", "2e2"). [CHAR_LIMIT=1] -->
+ <string name="digit_2">2</string>
+ <!-- Decimal representation of three (e.g. "3", "33", "3.3", "3e3"). [CHAR_LIMIT=1] -->
+ <string name="digit_3">3</string>
+ <!-- Decimal representation of four (e.g. "4", "44", "4.4", "4e4"). [CHAR_LIMIT=1] -->
+ <string name="digit_4">4</string>
+ <!-- Decimal representation of five (e.g. "5", "55", "5.5", "5e5"). [CHAR_LIMIT=1] -->
+ <string name="digit_5">5</string>
+ <!-- Decimal representation of six (e.g. "6", "66", "6.6", "6e6"). [CHAR_LIMIT=1] -->
+ <string name="digit_6">6</string>
+ <!-- Decimal representation of seven (e.g. "7", "77", "7.7", "7e7"). [CHAR_LIMIT=1] -->
+ <string name="digit_7">7</string>
+ <!-- Decimal representation of eight (e.g. "8", "88", "8.8", "8e8"). [CHAR_LIMIT=1] -->
+ <string name="digit_8">8</string>
+ <!-- Decimal representation of eight (e.g. "9", "99", "9.9", "9e9"). [CHAR_LIMIT=1] -->
+ <string name="digit_9">9</string>
+
+ <!-- Abbrev. name of cosine function (e.g. "cos(π)". [CHAR_LIMIT=3] -->
+ <string name="fun_cos">cos</string>
+ <!-- Natural logarithm function (e.g. "ln(2)"). [CHAR_LIMIT=3] -->
+ <string name="fun_ln">ln</string>
+ <!-- Logarithm function (e.g. "log(10)"). [CHAR_LIMIT=3] -->
+ <string name="fun_log">log</string>
+ <!-- Abbrev. name of sine function (e.g. "sin(π)". [CHAR_LIMIT=3] -->
+ <string name="fun_sin">sin</string>
+ <!-- Abbrev. name of tangent function (e.g. "tan(π)". [CHAR_LIMIT=3] -->
+ <string name="fun_tan">tan</string>
+
+ <!-- Clear operation to clear the currently entered expression. [CHAR_LIMIT=3] -->
+ <string name="clr">clr</string>
+ <!-- Delete operation to remove last entered token. [CHAR_LIMIT=3] -->
+ <string name="del">del</string>
+
+ <!-- Content Descriptions -->
+ <eat-comment />
+
+ <!-- Content description for 'e' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_const_e">Euler\'s number</string>
+ <!-- Content description for 'π' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_const_pi">pi</string>
+
+ <!-- Content description for '.' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_dec_point">point</string>
+
+ <!-- Content description for '(' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_lparen">left parenthesis</string>
+ <!-- Content description for ')' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_rparen">right parenthesis</string>
+
+ <!-- Content description for 'cos' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_fun_cos">cosine</string>
+ <!-- Content description for 'ln' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_fun_ln">natural logarithm</string>
+ <!-- Content description for 'log' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_fun_log">logarithm</string>
+ <!-- Content description for 'sin' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_fun_sin">sine</string>
+ <!-- Content description for 'tan' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_fun_tan">tangent</string>
+
+ <!-- Content description for '+' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_op_add">plus</string>
+ <!-- Content description for '÷' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_op_div">divide</string>
+ <!-- Content description for '!' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_op_fact">factorial</string>
+ <!-- Content description for '×' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_op_mul">times</string>
+ <!-- Content description for '^' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_op_pow">power</string>
+ <!-- Content description for '√' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_op_sqrt">square root</string>
+ <!-- Content description for '-' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_op_sub">minus</string>
+
+ <!-- Content description for "clr" button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_clr">clear</string>
+ <!-- Content description for "del" button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_del">delete</string>
+ <!-- Content description for '=' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_eq">equals</string>
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 156da37..f561b98 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -1,126 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (C) 2007 The Android Open Source Project
+ Copyright (C) 2014 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
+ 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
+ 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="button_style" parent="@android:style/Widget.Quantum.Button.Borderless">
- <item name="android:textSize">24dp</item>
- <item name="android:fontFamily">sans-serif-light</item>
- <item name="android:textAllCaps">false</item>
- <item name="android:layout_width">match_parent</item>
- <item name="android:layout_height">match_parent</item>
- <item name="android:layout_weight">1</item>
- <item name="android:focusable">true</item>
- <item name="android:onClick">onClick</item>
- </style>
-
- <style name="function_pad">
- <item name="android:background">@color/gray_40</item>
- </style>
+ 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.
+ -->
- <style name="function_button" parent="button_style">
- <item name="android:background">@drawable/btn_digit</item>
- <item name="android:textColor">@color/text_light</item>
- </style>
-
- <!-- Function button used on sw600 devices. -->
- <style name="function_button_sw600" parent="function_button">
- <item name="android:layout_width">0dip</item>
- <item name="android:layout_weight">1</item>
- </style>
-
- <style name="digit_pad">
- <item name="android:background">@color/gray_30</item>
- </style>
-
- <style name="digit_button" parent="button_style">
- <item name="android:background">@drawable/btn_digit</item>
- <item name="android:textColor">@color/text_light</item>
- </style>
-
- <!-- Digit button used on sw600 devices. -->
- <style name="digit_button_sw600" parent="digit_button">
- <item name="android:layout_width">0dip</item>
- <item name="android:layout_weight">1</item>
- </style>
-
- <style name="advanced_pad">
- <item name="android:background">@color/primary</item>
- </style>
-
- <style name="advanced_button" parent="button_style">
- <item name="android:background">@drawable/btn_advanced</item>
- <item name="android:textColor">@color/text_light</item>
- </style>
-
- <!-- Advanced button used on sw600 devices. -->
- <style name="advanced_button_s600" parent="advanced_button">
- <item name="android:layout_width">0dip</item>
- <item name="android:layout_weight">1</item>
- </style>
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="advanced_button_small" parent="advanced_button">
- <item name="android:textSize">30dp</item>
+ <style name="CalculatorTheme" parent="@android:style/Theme.Quantum.Light.NoActionBar">
+ <item name="android:navigationBarColor">@android:color/black</item>
+ <item name="android:statusBarColor">@color/calculator_accent_color</item>
+ <item name="android:windowContentOverlay">@null</item>
</style>
- <style name="button_small_style" parent="button_style">
- <item name="android:textSize">30dp</item>
+ <style name="DisplayEditTextStyle" parent="@android:style/Widget.Quantum.Light.EditText">
+ <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>
+ <item name="android:gravity">bottom|end</item>
</style>
- <!-- Style applied to a display card. -->
- <style name="display_style">
- <item name="android:textSize">@dimen/display_maximum_text_size</item>
- <item name="android:inputType">text|textNoSuggestions</item>
- <item name="android:gravity">right|center_vertical</item>
- <item name="android:textColor">@color/text_dark</item>
- <item name="android:maxLines">1</item>
- <item name="android:scrollbars">none</item>
- <item name="android:scrollHorizontally">true</item>
+ <style name="DisplayShadowStyle">
<item name="android:layout_width">match_parent</item>
- <item name="android:layout_height">match_parent</item>
- <item name="android:paddingTop">16dp</item>
- <item name="android:paddingLeft">8dp</item>
- <item name="android:paddingRight">8dp</item>
- <item name="android:paddingBottom">16dp</item>
- <item name="android:background">@drawable/card_background</item>
- <item name="android:layout_margin">8sp</item>
+ <item name="android:layout_height">8dip</item>
+ <item name="android:background">@drawable/display_shadow</item>
</style>
- <!-- Style applied to the display card container. -->
- <style name="display_holder_style">
- <item name="android:background">@color/gray_80</item>
+ <style name="PadButtonStyle" parent="@android:style/Widget.Quantum.Light.Button.Borderless">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:background">@drawable/pad_btn_background</item>
+ <item name="android:fontFamily">sans-serif-light</item>
+ <item name="android:gravity">center</item>
+ <item name="android:includeFontPadding">false</item>
+ <item name="android:minWidth">0dip</item>
+ <item name="android:minHeight">0dip</item>
+ <item name="android:textAllCaps">false</item>
+ <item name="android:textColor">@color/pad_button_text_color</item>
</style>
- <!-- Style used in sw600dp single-screen mode. -->
- <style name="btn_row_style">
+ <style name="PadLayoutStyle">
<item name="android:layout_width">match_parent</item>
- <item name="android:layout_height">0dip</item>
- <item name="android:layout_weight">1</item>
- <item name="android:orientation">horizontal</item>
- </style>
-
- <style name="btn_clear">
- <item name="android:background">?android:attr/selectableItemBackground</item>
- <item name="android:textSize">@dimen/btn_clear_text_size</item>
- </style>
-
- <style name="AppTheme" parent="@android:style/Theme.Quantum.NoActionBar">
- <item name="android:colorPrimary">@color/primary</item>
- <item name="android:colorPrimaryLight">@color/primary_light</item>
- <item name="android:colorPrimaryDark">@color/primary_dark</item>
+ <item name="android:layout_height">match_parent</item>
</style>
</resources>