summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Klaassen <justinklaassen@google.com>2016-12-02 10:41:09 -0800
committerJustin Klaassen <justinklaassen@google.com>2016-12-02 15:11:35 -0800
commitd6d68b49aaf5b0fbcce89097ca4c02d73bcea4dd (patch)
tree35b1c774e2b76cd909b4c751c965afc8be9c0225
parent23629266834a251cb937a885e5223e5ae37cc6fa (diff)
downloadandroid_packages_apps_DeskClock-d6d68b49aaf5b0fbcce89097ca4c02d73bcea4dd.tar.gz
android_packages_apps_DeskClock-d6d68b49aaf5b0fbcce89097ca4c02d73bcea4dd.tar.bz2
android_packages_apps_DeskClock-d6d68b49aaf5b0fbcce89097ca4c02d73bcea4dd.zip
Refactor themes
- Created separate themes.xml file. - Removed unnecessary styles and themes. - Removed some colors that should be accessed via theme. Bug: 25693255 Test: manually verified on N MR1 and KK devices. Change-Id: Icd5ce5fcdf849a085823cc4293b07cae770049ff
-rw-r--r--AndroidManifest.xml21
-rw-r--r--res/drawable/bg_circle_accent.xml21
-rw-r--r--res/drawable/fastscroll_preview.xml25
-rw-r--r--res/drawable/fastscroll_thumb.xml32
-rw-r--r--res/drawable/fastscroll_track.xml31
-rw-r--r--res/drawable/ic_checkmark.xml27
-rw-r--r--res/layout-land/time_setup_view.xml30
-rw-r--r--res/layout/alarm_activity.xml9
-rw-r--r--res/layout/alarm_time_collapsed.xml25
-rw-r--r--res/layout/alarm_time_expanded.xml25
-rw-r--r--res/layout/chronometer_notif_content.xml28
-rw-r--r--res/layout/cities_activity.xml29
-rw-r--r--res/layout/desk_clock.xml26
-rw-r--r--res/layout/ringtone_item_sound.xml26
-rw-r--r--res/layout/time_setup_view.xml27
-rw-r--r--res/values-land/dimens.xml25
-rw-r--r--res/values-v21/styles.xml68
-rw-r--r--res/values-v23/styles.xml23
-rw-r--r--res/values/colors.xml35
-rw-r--r--res/values/dimens.xml43
-rw-r--r--res/values/strings.xml34
-rw-r--r--res/values/styles.xml171
-rw-r--r--res/values/themes.xml75
-rw-r--r--src/com/android/deskclock/Screensaver.java21
-rw-r--r--src/com/android/deskclock/alarms/TimePickerDialogFragment.java21
-rw-r--r--src/com/android/deskclock/worldclock/CitySelectionActivity.java136
26 files changed, 427 insertions, 607 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index eea8b0908..e2e1e81dd 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -6,7 +6,7 @@
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,
@@ -50,7 +50,8 @@
android:icon="@mipmap/ic_launcher_alarmclock"
android:label="@string/app_label"
android:requiredForAllUsers="true"
- android:supportsRtl="true">
+ android:supportsRtl="true"
+ android:theme="@style/Theme.DeskClock">
<!-- ============================================================== -->
<!-- Main app components. -->
@@ -60,7 +61,6 @@
android:name=".DeskClock"
android:label="@string/app_label"
android:launchMode="singleTask"
- android:theme="@style/DeskClockTheme"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -74,7 +74,7 @@
android:name=".ringtone.RingtonePickerActivity"
android:excludeFromRecents="true"
android:taskAffinity=""
- android:theme="@style/RingtonePickerTheme" />
+ android:theme="@style/Theme.DeskClock.RingtonePicker" />
<activity
android:name=".worldclock.CitySelectionActivity"
@@ -82,7 +82,7 @@
android:label="@string/cities_activity_title"
android:parentActivityName=".DeskClock"
android:taskAffinity=""
- android:theme="@style/CitiesTheme" />
+ android:theme="@style/Theme.DeskClock.CitySelection" />
<activity
android:name=".settings.SettingsActivity"
@@ -90,7 +90,7 @@
android:label="@string/settings"
android:parentActivityName=".DeskClock"
android:taskAffinity=""
- android:theme="@style/SettingsTheme" />
+ android:theme="@style/Theme.DeskClock.Settings" />
<activity
android:name=".HandleShortcuts"
@@ -144,7 +144,6 @@
android:resizeableActivity="false"
android:showOnLockScreen="true"
android:taskAffinity=""
- android:theme="@style/AlarmAlertFullScreenTheme"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
@@ -191,8 +190,7 @@
android:launchMode="singleInstance"
android:resizeableActivity="false"
android:showOnLockScreen="true"
- android:taskAffinity=""
- android:theme="@style/ExpiredTimersActivityTheme" />
+ android:taskAffinity="" />
<!-- Legacy broadcast receiver that honors old scheduled timers across app upgrade. -->
<receiver
@@ -226,15 +224,14 @@
android:name=".ScreensaverActivity"
android:excludeFromRecents="true"
android:resizeableActivity="false"
- android:taskAffinity=""
- android:theme="@style/ScreensaverActivityTheme" />
+ android:taskAffinity="" />
<activity
android:name=".settings.ScreensaverSettingsActivity"
android:excludeFromRecents="true"
android:label="@string/screensaver_settings"
android:taskAffinity=""
- android:theme="@style/SettingsTheme" />
+ android:theme="@style/Theme.DeskClock.Settings" />
<service
android:name=".Screensaver"
diff --git a/res/drawable/bg_circle_accent.xml b/res/drawable/bg_circle_accent.xml
deleted file mode 100644
index a3c256df4..000000000
--- a/res/drawable/bg_circle_accent.xml
+++ /dev/null
@@ -1,21 +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.
- -->
-
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="oval">
- <solid android:color="@color/color_accent" />
-</shape>
diff --git a/res/drawable/fastscroll_preview.xml b/res/drawable/fastscroll_preview.xml
deleted file mode 100644
index 33424f6e4..000000000
--- a/res/drawable/fastscroll_preview.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 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.
--->
-
-<inset xmlns:android="http://schemas.android.com/apk/res/android"
- android:insetRight="@dimen/fastscroll_preview_padding"
- android:insetLeft="@dimen/fastscroll_preview_padding">
- <shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <corners android:radius="44dp"/>
- <solid android:color="@color/color_accent" />
- </shape>
-</inset>
diff --git a/res/drawable/fastscroll_thumb.xml b/res/drawable/fastscroll_thumb.xml
deleted file mode 100644
index d57b07943..000000000
--- a/res/drawable/fastscroll_thumb.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 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.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true">
- <shape android:shape="rectangle">
- <solid android:color="@color/color_accent" />
- <size android:width="@dimen/fastscroll_thumb_width"
- android:height="@dimen/fastscroll_thumb_height" />
- </shape>
- </item>
- <item>
- <shape android:shape="rectangle">
- <solid android:color="#42ffffff" />
- <size android:width="@dimen/fastscroll_thumb_width"
- android:height="@dimen/fastscroll_thumb_height" />
- </shape>
- </item>
-</selector>
diff --git a/res/drawable/fastscroll_track.xml b/res/drawable/fastscroll_track.xml
deleted file mode 100644
index 81b626125..000000000
--- a/res/drawable/fastscroll_track.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2015 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
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true">
- <shape android:shape="rectangle">
- <solid android:color="#1fffffff"/>
- <size android:width="@dimen/fastscroll_track_width" />
- </shape>
- </item>
- <item>
- <shape android:shape="rectangle">
- <solid android:color="@color/transparent"/>
- <size android:width="@dimen/fastscroll_track_width" />
- </shape>
- </item>
-</selector>
diff --git a/res/drawable/ic_checkmark.xml b/res/drawable/ic_checkmark.xml
index 4b0685eb4..ed5c32dde 100644
--- a/res/drawable/ic_checkmark.xml
+++ b/res/drawable/ic_checkmark.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The Android Open Source Project
+<!--
+ Copyright (C) 2016 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ 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.
+ -->
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
@@ -21,6 +22,6 @@
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
- android:fillColor="@color/color_accent"
+ android:fillColor="#FFF"
android:pathData="M9,16.2L4.8,12l-1.4,1.4L9,19 21,7l-1.4,-1.4L9,16.2z" />
-</vector> \ No newline at end of file
+</vector>
diff --git a/res/layout-land/time_setup_view.xml b/res/layout-land/time_setup_view.xml
index 37404a580..1fc34dd4c 100644
--- a/res/layout-land/time_setup_view.xml
+++ b/res/layout-land/time_setup_view.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 The Android Open Source Project
+<!--
+ Copyright (C) 2016 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ 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.
+ -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
@@ -60,7 +61,7 @@
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="8dp"
- android:background="@color/dialog_gray" />
+ android:background="@color/hairline" />
</LinearLayout>
@@ -73,16 +74,19 @@
<include
android:id="@+id/first"
layout="@layout/three_keys_view" />
+
<include
android:id="@+id/second"
layout="@layout/three_keys_view" />
+
<include
android:id="@+id/third"
layout="@layout/three_keys_view" />
+
<include
android:id="@+id/fourth"
layout="@layout/three_keys_view" />
</LinearLayout>
-</LinearLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/res/layout/alarm_activity.xml b/res/layout/alarm_activity.xml
index c0b07f21f..d4461149c 100644
--- a/res/layout/alarm_activity.xml
+++ b/res/layout/alarm_activity.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (C) 2015 The Android Open Source Project
+ Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+ 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,
@@ -75,12 +75,13 @@
android:id="@+id/snooze"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:background="@drawable/bg_circle_accent"
+ android:background="@drawable/bg_circle_white"
android:contentDescription="@string/alarm_alert_snooze_text"
app:layout_row="2"
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="center"
+ app:backgroundTint="?attr/colorAccent"
app:srcCompat="@drawable/ic_snooze" />
<ImageView
@@ -154,4 +155,4 @@
</LinearLayout>
-</FrameLayout> \ No newline at end of file
+</FrameLayout>
diff --git a/res/layout/alarm_time_collapsed.xml b/res/layout/alarm_time_collapsed.xml
index fe701698a..6c0e3c70f 100644
--- a/res/layout/alarm_time_collapsed.xml
+++ b/res/layout/alarm_time_collapsed.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!--
+ Copyright (C) 2016 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ 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.
+ -->
<android.support.v7.widget.GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
@@ -42,7 +43,7 @@
android:layout_marginTop="@dimen/alarm_clock_vertical_margin"
android:minHeight="@dimen/touch_target_min_size"
android:minWidth="@dimen/touch_target_min_size"
- android:theme="@style/ControlAccentThemeOverlay"
+ android:theme="@style/ThemeOverlay.Control.Accent"
app:layout_column="3"
app:layout_columnSpan="2"
app:layout_gravity="center_vertical"
diff --git a/res/layout/alarm_time_expanded.xml b/res/layout/alarm_time_expanded.xml
index 849c7a411..bd76ebc68 100644
--- a/res/layout/alarm_time_expanded.xml
+++ b/res/layout/alarm_time_expanded.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!--
+ Copyright (C) 2016 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ 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.
+ -->
<android.support.v7.widget.GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
@@ -43,7 +44,7 @@
android:layout_marginTop="@dimen/alarm_clock_vertical_margin"
android:minHeight="@dimen/touch_target_min_size"
android:minWidth="@dimen/touch_target_min_size"
- android:theme="@style/ControlAccentThemeOverlay"
+ android:theme="@style/ThemeOverlay.Control.Accent"
app:layout_column="6"
app:layout_columnSpan="2"
app:layout_gravity="center_vertical"
diff --git a/res/layout/chronometer_notif_content.xml b/res/layout/chronometer_notif_content.xml
index 8cb6d5298..c962a0e11 100644
--- a/res/layout/chronometer_notif_content.xml
+++ b/res/layout/chronometer_notif_content.xml
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (C) 2016 The Android Open Source Project
+ Copyright (C) 2016 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ 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.
+ -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
@@ -26,13 +26,13 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
- android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Title" />
+ android:textAppearance="@style/TextAppearance.AppCompat.Notification.Title" />
<TextView
android:id="@+id/state"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
- android:textAppearance="@style/TextAppearance.StatusBar.EventContent" />
+ android:textAppearance="@style/TextAppearance.AppCompat.Notification" />
-</LinearLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/res/layout/cities_activity.xml b/res/layout/cities_activity.xml
index 07c5247b6..d80865d83 100644
--- a/res/layout/cities_activity.xml
+++ b/res/layout/cities_activity.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 The Android Open Source Project
+<!--
+ Copyright (C) 2016 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ 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.
+ -->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
@@ -26,7 +27,9 @@
android:id="@+id/cities_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:clipToPadding="false"
android:divider="@null"
- android:theme="@style/ControlAccentThemeOverlay" />
+ android:scrollbarStyle="insideInset"
+ android:theme="@style/ThemeOverlay.Control.Accent" />
-</FrameLayout> \ No newline at end of file
+</FrameLayout>
diff --git a/res/layout/desk_clock.xml b/res/layout/desk_clock.xml
index 19b04e4b4..486eb083e 100644
--- a/res/layout/desk_clock.xml
+++ b/res/layout/desk_clock.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 The Android Open Source Project
+<!--
+ Copyright (C) 2016 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ 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.
+ -->
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
@@ -21,7 +22,8 @@
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:fitsSystemWindows="true">
+ android:fitsSystemWindows="true"
+ app:statusBarBackground="@null">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
diff --git a/res/layout/ringtone_item_sound.xml b/res/layout/ringtone_item_sound.xml
index 11efc5051..12bd7653f 100644
--- a/res/layout/ringtone_item_sound.xml
+++ b/res/layout/ringtone_item_sound.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The Android Open Source Project
+<!--
+ Copyright (C) 2016 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ 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.
+ -->
<!-- This parent FrameLayout provides a tap ripple effect over all children. -->
<FrameLayout
@@ -75,6 +76,7 @@
android:layout_centerVertical="true"
android:importantForAccessibility="no"
android:scaleType="center"
+ android:tint="?attr/colorAccent"
android:visibility="gone"
app:srcCompat="@drawable/ic_checkmark" />
@@ -87,4 +89,4 @@
</LinearLayout>
-</FrameLayout> \ No newline at end of file
+</FrameLayout>
diff --git a/res/layout/time_setup_view.xml b/res/layout/time_setup_view.xml
index c5a837744..f1d06a911 100644
--- a/res/layout/time_setup_view.xml
+++ b/res/layout/time_setup_view.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 The Android Open Source Project
+<!--
+ Copyright (C) 2016 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ 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.
+ -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
@@ -50,7 +51,7 @@
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="8dp"
- android:background="@color/dialog_gray" />
+ android:background="@color/hairline" />
<include
android:id="@+id/first"
@@ -68,4 +69,4 @@
android:id="@+id/fourth"
layout="@layout/three_keys_view" />
-</LinearLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml
index 786af20ac..0860a682f 100644
--- a/res/values-land/dimens.xml
+++ b/res/values-land/dimens.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
+<!--
+ Copyright (C) 2016 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ 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.
+ -->
<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. -->
@@ -22,8 +23,6 @@
<dimen name="timer_setup_delete_margin">12sp</dimen>
<dimen name="timer_setup_digit_font_size">26sp</dimen>
- <dimen name="actionbar_tab_padding">32dip</dimen>
-
<!-- Size of margin for circles. -->
<dimen name="analog_clock_margin">70dp</dimen>
<dimen name="analog_clock_size">168dp</dimen>
diff --git a/res/values-v21/styles.xml b/res/values-v21/styles.xml
index d550c3b94..f1dca16c0 100644
--- a/res/values-v21/styles.xml
+++ b/res/values-v21/styles.xml
@@ -1,29 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!--
+ Copyright (C) 2016 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ 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 xmlns:tools="http://schemas.android.com/tools">
-
- <!-- Custom notification content styles -->
- <!-- copied TextAppearance.Material.Button -->
- <style name="TextAppearance.StatusBar.EventContent.Action">
- <item name="android:textSize">14sp</item>
- <item name="android:fontFamily">sans-serif-medium</item>
- <item name="android:textAllCaps">true</item>
- <item name="android:textColor">@color/black_54p</item>
- </style>
+<resources>
<style name="body">
<item name="android:textSize">14sp</item>
@@ -31,16 +23,6 @@
<item name="android:fontFamily">sans-serif-medium</item>
</style>
- <style name="TextAppearance.StatusBar.EventContent" tools:ignore="PrivateResource">
- <item name="android:textSize">14sp</item>
- <item name="android:textColor">@color/black_54p</item>
- </style>
-
- <style name="TextAppearance.StatusBar.EventContent.Title" tools:ignore="PrivateResource">
- <item name="android:textSize">16sp</item>
- <item name="android:textColor">@color/black_87p</item>
- </style>
-
<style name="PrimaryLabelTextAppearance" parent="PrimaryLabelTextParentAppearance">
<item name="android:fontFamily">sans-serif-medium</item>
</style>
@@ -49,28 +31,4 @@
<item name="android:fontFamily">sans-serif-medium</item>
</style>
- <style name="TimePickerTheme" parent="android:Theme.DeviceDefault.Dialog">
- <item name="android:colorAccent">@color/color_accent</item>
- <item name="android:colorBackground">@color/grey_800</item>
- <item name="android:textColorPrimary">@color/white</item>
- <item name="android:textColorPrimaryInverse">?android:attr/textColorPrimary</item>
- <item name="android:textColorSecondary">@color/white_50p</item>
- <item name="android:textColorSecondaryInverse">@color/white</item>
- <item name="android:timePickerStyle">@style/TimePickerStyle</item>
- </style>
-
- <style name="TimePickerStyle" parent="android:Widget.Material.TimePicker">
- <item name="android:headerBackground">@android:color/transparent</item>
- <item name="android:numbersBackgroundColor">@android:color/transparent</item>
- <item name="android:numbersTextColor">@color/white</item>
- </style>
-
- <style name="CitiesTheme" parent="BaseActivityTheme">
- <item name="android:fastScrollThumbDrawable">@drawable/fastscroll_thumb</item>
- <item name="android:fastScrollTrackDrawable">@drawable/fastscroll_track</item>
- <item name="actionBarStyle">@style/CitiesActionBarStyle</item>
- <item name="windowActionBar">true</item>
- <item name="windowNoTitle">false</item>
- </style>
-
</resources>
diff --git a/res/values-v23/styles.xml b/res/values-v23/styles.xml
index 5ecef8c3c..4d4fb1c57 100644
--- a/res/values-v23/styles.xml
+++ b/res/values-v23/styles.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The Android Open Source Project
+<!--
+ Copyright (C) 2016 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ 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>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index efdbb1066..19db82482 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!--
+ Copyright (C) 2016 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ 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>
- <color name="dialog_gray">#28FFFFFF</color>
<color name="black">#FF000000</color>
<color name="black_87p">#DE000000</color>
@@ -23,28 +23,17 @@
<color name="white">#FFFFFFFF</color>
<color name="white_08p">#14FFFFFF</color>
- <color name="white_50p">#80FFFFFF</color>
<color name="white_63p">#A0FFFFFF</color>
<color name="no_alarms">#4CFFFFFF</color>
<color name="transparent">#00000000</color>
- <color name="color_accent">#DA4336</color>
<color name="hairline">#28FFFFFF</color>
<color name="clock_gray">#B3FFFFFF</color>
<color name="default_background">#1A237E</color>
- <color name="status_bar">#66000000</color>
-
- <color name="grey_800">#FF303030</color>
-
- <!-- Values for custom notification -->
- <color name="notif_text_grey">#9C9C9C</color>
<!-- shadowColor for widget text -->
<color name="widget_shadow_color">#67000000</color>
-
- <!-- Redefine the fallback color used by preference-v14 to match our accent color. -->
- <color name="preference_fallback_accent_color">@color/color_accent</color>
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index ed92960f7..3521b4402 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -1,22 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
+<!--
+ Copyright (C) 2016 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ 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.
+ -->
<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. -->
-<resources xmlns:tools="http://schemas.android.com/tools">
+<resources>
<dimen name="label_text_size">14sp</dimen>
<dimen name="label_edittext_padding">21dp</dimen>
<dimen name="time_margin_top">32dip</dimen>
@@ -31,8 +32,6 @@
<!-- Analog clock size in the the screen saver -->
<dimen name="bottom_text_size">16sp</dimen>
- <dimen name="actionbar_tab_padding">0dip</dimen>
-
<dimen name="alarm_text_font_size">16sp</dimen>
<dimen name="circletimer_dot_size">12dp</dimen>
<dimen name="circletimer_circle_size">4dp</dimen>
@@ -87,16 +86,6 @@
<dimen name="analog_clock_margin">60dp</dimen>
<dimen name="analog_clock_size">294dp</dimen>
- <!-- Size of notification text (see TextAppearance.StatusBar.EventContent) -->
- <dimen name="notification_text_size">14dp</dimen>
- <!-- Size of notification text titles (see TextAppearance.StatusBar.EventContent.Title) -->
- <dimen name="notification_title_text_size">18dp</dimen>
- <!-- Size of margin between icon and text / title text. -->
- <dimen name="notification_content_margin_start" tools:override="true">8dp</dimen>
-
- <!-- Width of the clock, for use with alarm buttons. -->
- <!-- Bottom padding for alarm lock screen hint text -->
-
<!-- Size of time zone analog clocks in world clock. -->
<dimen name="world_clock_analog_size">100dp</dimen>
@@ -128,12 +117,6 @@
<!-- The minimum height/width of any touch target -->
<dimen name="touch_target_min_size">48dp</dimen>
- <!-- Dimens for cities fastscroll -->
- <dimen name="fastscroll_thumb_height">48dp</dimen>
- <dimen name="fastscroll_thumb_width">8dp</dimen>
- <dimen name="fastscroll_preview_padding">8dp</dimen>
- <dimen name="fastscroll_track_width">8dp</dimen>
-
<!-- Dimens for drawable padding on Alarms tab -->
<dimen name="alarm_horizontal_padding">16dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 6f1cc532c..f7f698bcb 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
+<!--
+ Copyright (C) 2016 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ 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
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"
@@ -461,12 +462,6 @@
<!-- Accessibility labels for alarm buttons -->
<string name="label_description">Label</string>
<string name="ringtone_description">Ringtone</string>
- <!-- Talkback announcement for what will happen when user double taps a collapsed alarm.
- [CHAR LIMIT=NONE] -->
- <string name="expand_description">Expand</string>
- <!-- Talkback announcement for what will happen when user double taps an expanded alarm.
- [CHAR LIMIT=NONE] -->
- <string name="collapse_description">Collapse</string>
<!-- ActionBar strings -->
<!-- Describes the purpose of the tab button which which switches the activity to the Alarm page -->
@@ -668,11 +663,6 @@
<!-- Title in a list dialog box to pick a time zone for the user's home -->
<string name="home_time_zone_title">Home time zone</string>
- <!-- Textual content of the button to discard the current dialog values and close the dialog -->
- <string name="time_picker_cancel">Cancel</string>
- <!-- Textual content of the button to update an alarm with the current dialog values -->
- <string name="time_picker_set">OK</string>
-
<!--
Accessibility string read when a city checkbox is checked.
Ex. "Ann Arbor checked"
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 1629ca14f..71f8af7d9 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -1,132 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!--
+ Copyright (C) 2016 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ 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 xmlns:tools="http://schemas.android.com/tools">
- <style name="BaseActivityTheme" parent="Theme.AppCompat.NoActionBar">
- <item name="android:windowBackground">@color/default_background</item>
- <item name="android:windowContentOverlay">@null</item>
- <item name="android:windowTranslucentStatus">true</item>
- <item name="android:windowTranslucentNavigation">true</item>
-
- <item name="alertDialogTheme">@style/AlertDialogTheme</item>
- <item name="colorAccent">@color/color_accent</item>
- <item name="colorControlActivated">@color/white</item>
- <item name="colorControlNormal">@color/white</item>
- <item name="colorPrimaryDark">@color/status_bar</item>
- <item name="imageButtonStyle">@style/ImageButtonStyle</item>
- <item name="popupTheme">@style/DefaultPopupTheme</item>
- </style>
-
- <style name="DefaultPopupTheme" parent="Theme.AppCompat">
- <item name="android:textColorPrimary">@color/white</item>
- <item name="android:colorBackground">@color/grey_800</item>
- </style>
-
- <style name="AlertDialogTheme" parent="Theme.AppCompat.Dialog.Alert">
- <!-- Attributes from support.v7.appcompat -->
- <item name="colorAccent">@color/color_accent</item>
- </style>
-
- <style name="DialogTheme" parent="Theme.AppCompat.Dialog">
- <!-- Attributes from support.v7.appcompat -->
- <item name="colorAccent">@color/color_accent</item>
- </style>
-
- <style name="ControlAccentThemeOverlay">
- <!-- Attributes from support.v7.appcompat -->
- <item name="colorControlActivated">?attr/colorAccent</item>
- </style>
-
- <style name="DeskClockTabBaseStyle" parent="Widget.AppCompat.ActionBar.TabView">
- <item name="android:paddingLeft">@dimen/actionbar_tab_padding</item>
- <item name="android:paddingRight">@dimen/actionbar_tab_padding</item>
- <item name="android:gravity">center</item>
- </style>
-
- <style name="SettingsTheme" parent="BaseActivityTheme">
- <item name="android:detailsElementBackground">@null</item>
-
- <!-- Attributes from support.v7.appcompat -->
- <item name="alertDialogTheme">@style/SettingsAlertDialogTheme</item>
- <item name="actionBarStyle">@style/SettingsActionBarStyle</item>
- <item name="colorControlActivated">?attr/colorAccent</item>
- <item name="preferenceTheme">@style/SettingsPreferenceTheme</item>
- <item name="windowActionBar">true</item>
- <item name="windowNoTitle">false</item>
- </style>
-
- <style name="RingtonePickerTheme" parent="BaseActivityTheme">
- <item name="actionBarStyle">@style/SettingsActionBarStyle</item>
- <item name="windowActionBar">true</item>
- <item name="windowNoTitle">false</item>
- </style>
-
- <style name="SettingsActionBarStyle" parent="Widget.AppCompat.Toolbar">
- <item name="android:background">@null</item>
-
- <!-- Attributes from support.v7.appcompat -->
- <item name="displayOptions">showTitle|homeAsUp</item>
- </style>
-
- <style name="SettingsAlertDialogTheme" parent="ThemeOverlay.AppCompat.Dialog.Alert">
- <item name="android:colorBackground">@color/grey_800</item>
- </style>
-
- <style name="SettingsPreferenceTheme" parent="PreferenceThemeOverlay.v14.Material">
- <!-- Attributes from support.v7.preference -->
- <item name="preferenceFragmentStyle">@style/SettingsPreferenceFragmentStyle</item>
- </style>
-
- <style name="SettingsPreferenceFragmentStyle" parent="PreferenceFragment.Material">
- <item name="android:divider">@color/hairline</item>
- <item name="android:dividerHeight">@dimen/hairline_height</item>
- </style>
-
- <style name="CitiesTheme" parent="BaseActivityTheme">
- <item name="android:fastScrollPreviewBackgroundLeft">@drawable/fastscroll_preview</item>
- <item name="android:fastScrollPreviewBackgroundRight">@drawable/fastscroll_preview</item>
- <item name="android:fastScrollTextColor">@color/white</item>
- <item name="android:fastScrollThumbDrawable">@drawable/fastscroll_thumb</item>
- <item name="android:fastScrollTrackDrawable">@drawable/fastscroll_track</item>
- <!-- Attributes from support.v7.appcompat -->
- <item name="windowActionBar">true</item>
- <item name="windowNoTitle">false</item>
- <item name="actionBarStyle">@style/CitiesActionBarStyle</item>
- </style>
-
- <style name="CitiesActionBarStyle" parent="Widget.AppCompat.ActionBar">
- <item name="android:background">@null</item>
-
- <!-- Attributes from support.v7.appcompat -->
- <item name="displayOptions">homeAsUp</item>
- </style>
-
- <style name="AlarmAlertFullScreenTheme" parent="BaseActivityTheme" />
-
- <style name="DeskClockTheme" parent="BaseActivityTheme" />
-
- <style name="ExpiredTimersActivityTheme" parent="BaseActivityTheme" />
-
- <style name="ScreensaverActivityTheme" parent="Theme.AppCompat.NoActionBar" />
-
- <style name="ImageButtonStyle" parent="Widget.AppCompat.ImageButton">
- <item name="android:background">?attr/selectableItemBackgroundBorderless</item>
- </style>
-
<style name="alarm_list_left_column">
<item name="android:layout_width">68dip</item>
<item name="android:layout_height">68dip</item>
@@ -176,7 +66,7 @@
<item name="android:textSize">56sp</item>
<item name="android:textColor">@color/white</item>
<item name="android:fontFamily">sans-serif-light</item>
- <item name="android:fontFeatureSettings" tools:targetApi="lollipop">tnum</item>
+ <item name="android:fontFeatureSettings" tools:targetApi="21">tnum</item>
</style>
<style name="world_clock_time">
@@ -248,35 +138,34 @@
<style name="SecondaryLabelTextAppearance" parent="SecondaryLabelTextParentAppearance" />
- <style name="TextAppearance">
- <item name="android:textSize">16sp</item>
- <item name="android:textStyle">normal</item>
- </style>
-
<style name="TextAppearance.Tab" parent="TextAppearance.Design.Tab">
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:textSize">12sp</item>
</style>
- <!-- Status Bar Styles -->
- <style name="TextAppearance.StatusBar">
- <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
+ <style name="Widget.ActionBar" parent="Widget.AppCompat.ActionBar">
+ <item name="android:background">@null</item>
+
+ <!-- Attributes from android.support.v7.appcompat -->
+ <item name="displayOptions">showTitle|homeAsUp</item>
</style>
- <!-- Notification content styles -->
- <style name="TextAppearance.StatusBar.EventContent" tools:ignore="PrivateResource">
- <item name="android:textSize">@dimen/notification_text_size</item>
- <item name="android:textColor">@color/notif_text_grey</item>
+ <style name="Widget.ActionBar.NoTitle">
+ <!-- Attributes from android.support.v7.appcompat -->
+ <item name="displayOptions">homeAsUp</item>
</style>
+ col
- <style name="TextAppearance.StatusBar.EventContent.Title" tools:ignore="PrivateResource">
- <item name="android:textSize">@dimen/notification_title_text_size</item>
- <item name="android:textColor">@color/white</item>
+ <style name="Widget.ImageButton" parent="Widget.AppCompat.ImageButton">
+ <item name="android:background">?attr/selectableItemBackgroundBorderless</item>
</style>
- <style name="TimePickerTheme" parent="android:Theme.DeviceDefault.Dialog">
- <item name="android:windowBackground">@android:color/transparent</item>
- <item name="android:colorBackground">@color/grey_800</item>
+ <style name="Widget.TimePicker" parent="android:Widget.Material.TimePicker"
+ tools:targetApi="21">
+ <item name="android:headerBackground">@android:color/transparent</item>
+ <item name="android:numbersBackgroundColor">@android:color/transparent</item>
+ <item name="android:numbersSelectorColor">?attr/colorAccent</item>
+ <item name="android:numbersTextColor">?android:attr/textColorPrimary</item>
</style>
</resources>
diff --git a/res/values/themes.xml b/res/values/themes.xml
new file mode 100644
index 000000000..ba15c52f0
--- /dev/null
+++ b/res/values/themes.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:tools="http://schemas.android.com/tools">
+
+ <style name="Theme.DeskClock" parent="Theme.AppCompat.NoActionBar">
+ <item name="android:colorBackgroundFloating" tools:targetApi="23">
+ ?attr/colorBackgroundFloating
+ </item>
+ <item name="android:navigationBarColor" tools:targetApi="21">?attr/colorPrimaryDark</item>
+ <item name="android:popupTheme" tools:targetApi="21">?attr/popupTheme</item>
+ <item name="android:timePickerStyle" tools:targetApi="21">@style/Widget.TimePicker</item>
+ <item name="android:windowBackground">@color/default_background</item>
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:windowOverscan">true</item>
+
+ <!-- Attributes from android.support.v7.appcompat -->
+ <item name="colorAccent">#DA4336</item>
+ <item name="colorBackgroundFloating">#303030</item>
+ <item name="colorControlActivated">@android:color/white</item>
+ <item name="colorControlNormal">?android:attr/textColorPrimary</item>
+ <item name="colorPrimaryDark">#66000000</item>
+ <item name="imageButtonStyle">@style/Widget.ImageButton</item>
+ <item name="popupTheme">@style/ThemeOverlay.Popup</item>
+ </style>
+
+ <style name="Theme.DeskClock.Settings">
+ <!-- Attributes from android.support.v7.appcompat -->
+ <item name="actionBarStyle">@style/Widget.ActionBar</item>
+ <item name="colorControlActivated">?attr/colorAccent</item>
+ <item name="windowActionBar">true</item>
+ <item name="windowNoTitle">false</item>
+
+ <!-- Attributes from android.support.v7.preference -->
+ <item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
+ </style>
+
+ <style name="Theme.DeskClock.RingtonePicker">
+ <!-- Attributes from android.support.v7.appcompat -->
+ <item name="actionBarStyle">@style/Widget.ActionBar</item>
+ <item name="windowActionBar">true</item>
+ <item name="windowNoTitle">false</item>
+ </style>
+
+ <style name="Theme.DeskClock.CitySelection">
+ <!-- Attributes from android.support.v7.appcompat -->
+ <item name="actionBarStyle">@style/Widget.ActionBar.NoTitle</item>
+ <item name="windowActionBar">true</item>
+ <item name="windowNoTitle">false</item>
+ </style>
+
+ <style name="ThemeOverlay.Control.Accent" parent="ThemeOverlay.AppCompat">
+ <!-- Attributes from android.support.v7.appcompat -->
+ <item name="colorControlActivated">?attr/colorAccent</item>
+ </style>
+
+ <style name="ThemeOverlay.Popup" parent="ThemeOverlay.AppCompat">
+ <item name="android:colorBackground">?attr/colorBackgroundFloating</item>
+ </style>
+
+</resources>
diff --git a/src/com/android/deskclock/Screensaver.java b/src/com/android/deskclock/Screensaver.java
index e5dec6a10..b76cb8c73 100644
--- a/src/com/android/deskclock/Screensaver.java
+++ b/src/com/android/deskclock/Screensaver.java
@@ -1,11 +1,11 @@
/*
- * Copyright (C) 2011 The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -47,14 +47,13 @@ public final class Screensaver extends DreamService {
private String mDateFormatForAccessibility;
/* Register ContentObserver to see alarm changes for pre-L */
- private final ContentObserver mSettingsContentObserver = Utils.isPreL()
- ? new ContentObserver(new Handler()) {
- @Override
- public void onChange(boolean selfChange) {
- Utils.refreshAlarm(Screensaver.this, mContentView);
- }
- }
- : null;
+ private final ContentObserver mSettingsContentObserver =
+ Utils.isLOrLater() ? null : new ContentObserver(new Handler()) {
+ @Override
+ public void onChange(boolean selfChange) {
+ Utils.refreshAlarm(Screensaver.this, mContentView);
+ }
+ };
// Runs every midnight or when the time changes and refreshes the date.
private final Runnable mMidnightUpdater = new Runnable() {
@@ -79,8 +78,6 @@ public final class Screensaver extends DreamService {
LOGGER.v("Screensaver created");
super.onCreate();
- setTheme(R.style.ScreensaverActivityTheme);
-
mDateFormat = getString(R.string.abbrev_wday_month_day_no_year);
mDateFormatForAccessibility = getString(R.string.full_wday_month_day_no_year);
}
diff --git a/src/com/android/deskclock/alarms/TimePickerDialogFragment.java b/src/com/android/deskclock/alarms/TimePickerDialogFragment.java
index d81911436..53015299e 100644
--- a/src/com/android/deskclock/alarms/TimePickerDialogFragment.java
+++ b/src/com/android/deskclock/alarms/TimePickerDialogFragment.java
@@ -5,7 +5,7 @@
* 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,
@@ -16,7 +16,6 @@
package com.android.deskclock.alarms;
-import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.app.Fragment;
@@ -25,10 +24,10 @@ import android.app.TimePickerDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
+import android.support.v7.app.AlertDialog;
import android.text.format.DateFormat;
import android.widget.TimePicker;
-import com.android.deskclock.R;
import com.android.deskclock.Utils;
import java.util.Calendar;
@@ -58,16 +57,14 @@ public class TimePickerDialogFragment extends DialogFragment {
if (Utils.isLOrLater()) {
final Context context = getActivity();
- return new TimePickerDialog(context, R.style.TimePickerTheme,
- new TimePickerDialog.OnTimeSetListener() {
- @Override
- public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
- listener.onTimeSet(TimePickerDialogFragment.this, hourOfDay, minute);
- }
- }, hour, minute, DateFormat.is24HourFormat(context));
+ return new TimePickerDialog(context, new TimePickerDialog.OnTimeSetListener() {
+ @Override
+ public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
+ listener.onTimeSet(TimePickerDialogFragment.this, hourOfDay, minute);
+ }
+ }, hour, minute, DateFormat.is24HourFormat(context));
} else {
- final AlertDialog.Builder builder =
- new AlertDialog.Builder(getActivity(), R.style.TimePickerTheme);
+ final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
final Context context = builder.getContext();
final TimePicker timePicker = new TimePicker(context);
diff --git a/src/com/android/deskclock/worldclock/CitySelectionActivity.java b/src/com/android/deskclock/worldclock/CitySelectionActivity.java
index bc21e8f54..72291139c 100644
--- a/src/com/android/deskclock/worldclock/CitySelectionActivity.java
+++ b/src/com/android/deskclock/worldclock/CitySelectionActivity.java
@@ -1,17 +1,17 @@
/*
* Copyright (C) 2016 The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
+ * 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.
+ * 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.
*/
package com.android.deskclock.worldclock;
@@ -39,10 +39,10 @@ import com.android.deskclock.BaseActivity;
import com.android.deskclock.DropShadowController;
import com.android.deskclock.R;
import com.android.deskclock.Utils;
-import com.android.deskclock.actionbarmenu.OptionsMenuManager;
import com.android.deskclock.actionbarmenu.MenuItemController;
import com.android.deskclock.actionbarmenu.MenuItemControllerFactory;
import com.android.deskclock.actionbarmenu.NavUpMenuItemController;
+import com.android.deskclock.actionbarmenu.OptionsMenuManager;
import com.android.deskclock.actionbarmenu.SearchMenuItemController;
import com.android.deskclock.actionbarmenu.SettingsMenuItemController;
import com.android.deskclock.data.City;
@@ -62,32 +62,42 @@ import static android.view.Menu.NONE;
/**
* This activity allows the user to alter the cities selected for display.
- *
+ * <p/>
* Note, it is possible for two instances of this Activity to exist simultaneously:
- *
+ * <p/>
* <ul>
- * <li>Clock Tab-> Tap Floating Action Button</li>
- * <li>Digital Widget -> Tap any city clock</li>
+ * <li>Clock Tab-> Tap Floating Action Button</li>
+ * <li>Digital Widget -> Tap any city clock</li>
* </ul>
- *
+ * <p/>
* As a result, {@link #onResume()} conservatively refreshes itself from the backing
* {@link DataModel} which may have changed since this activity was last displayed.
*/
public final class CitySelectionActivity extends BaseActivity {
- /** The list of all selected and unselected cities, indexed and possibly filtered. */
+ /**
+ * The list of all selected and unselected cities, indexed and possibly filtered.
+ */
private ListView mCitiesList;
- /** The adapter that presents all of the selected and unselected cities. */
+ /**
+ * The adapter that presents all of the selected and unselected cities.
+ */
private CityAdapter mCitiesAdapter;
- /** Manages all action bar menu display and click handling. */
+ /**
+ * Manages all action bar menu display and click handling.
+ */
private final OptionsMenuManager mOptionsMenuManager = new OptionsMenuManager();
- /** Menu item controller for search view. */
+ /**
+ * Menu item controller for search view.
+ */
private SearchMenuItemController mSearchMenuItemController;
- /** The controller that shows the drop shadow when content is not scrolled to the top. */
+ /**
+ * The controller that shows the drop shadow when content is not scrolled to the top.
+ */
private DropShadowController mDropShadowController;
@Override
@@ -98,18 +108,18 @@ public final class CitySelectionActivity extends BaseActivity {
mSearchMenuItemController =
new SearchMenuItemController(getSupportActionBar().getThemedContext(),
new SearchView.OnQueryTextListener() {
- @Override
- public boolean onQueryTextSubmit(String query) {
- return false;
- }
-
- @Override
- public boolean onQueryTextChange(String query) {
- mCitiesAdapter.filter(query);
- updateFastScrolling();
- return true;
- }
- }, savedInstanceState);
+ @Override
+ public boolean onQueryTextSubmit(String query) {
+ return false;
+ }
+
+ @Override
+ public boolean onQueryTextChange(String query) {
+ mCitiesAdapter.filter(query);
+ updateFastScrolling();
+ return true;
+ }
+ }, savedInstanceState);
mCitiesAdapter = new CityAdapter(this, mSearchMenuItemController);
mOptionsMenuManager.addMenuItemController(new NavUpMenuItemController(this))
.addMenuItemController(mSearchMenuItemController)
@@ -118,7 +128,6 @@ public final class CitySelectionActivity extends BaseActivity {
.addMenuItemController(MenuItemControllerFactory.getInstance()
.buildMenuItemControllers(this));
mCitiesList = (ListView) findViewById(R.id.cities_list);
- mCitiesList.setScrollBarStyle(View.SCROLLBARS_INSIDE_INSET);
mCitiesList.setAdapter(mCitiesAdapter);
updateFastScrolling();
@@ -180,7 +189,7 @@ public final class CitySelectionActivity extends BaseActivity {
/**
* This adapter presents data in 2 possible modes. If selected cities exist the format is:
- *
+ * <p/>
* <pre>
* Selected Cities
* City 1 (alphabetically first)
@@ -193,9 +202,9 @@ public final class CitySelectionActivity extends BaseActivity {
* City B2 (alphabetically second starting with B)
* ...
* </pre>
- *
+ * <p/>
* If selected cities do not exist, that section is removed and all that remains is:
- *
+ * <p/>
* <pre>
* A City A1 (alphabetically first starting with A)
* City A2 (alphabetically second starting with A)
@@ -208,44 +217,68 @@ public final class CitySelectionActivity extends BaseActivity {
private static final class CityAdapter extends BaseAdapter implements View.OnClickListener,
CompoundButton.OnCheckedChangeListener, SectionIndexer {
- /** The type of the single optional "Selected Cities" header entry. */
+ /**
+ * The type of the single optional "Selected Cities" header entry.
+ */
private static final int VIEW_TYPE_SELECTED_CITIES_HEADER = 0;
- /** The type of each city entry. */
+ /**
+ * The type of each city entry.
+ */
private static final int VIEW_TYPE_CITY = 1;
private final Context mContext;
private final LayoutInflater mInflater;
- /** The 12-hour time pattern for the current locale. */
+ /**
+ * The 12-hour time pattern for the current locale.
+ */
private final String mPattern12;
- /** The 24-hour time pattern for the current locale. */
+ /**
+ * The 24-hour time pattern for the current locale.
+ */
private final String mPattern24;
- /** {@code true} time should honor {@link #mPattern24}; {@link #mPattern12} otherwise. */
+ /**
+ * {@code true} time should honor {@link #mPattern24}; {@link #mPattern12} otherwise.
+ */
private boolean mIs24HoursMode;
- /** A calendar used to format time in a particular timezone. */
+ /**
+ * A calendar used to format time in a particular timezone.
+ */
private final Calendar mCalendar;
- /** The list of cities which may be filtered by a search term. */
+ /**
+ * The list of cities which may be filtered by a search term.
+ */
private List<City> mFilteredCities = Collections.emptyList();
- /** A mutable set of cities currently selected by the user. */
+ /**
+ * A mutable set of cities currently selected by the user.
+ */
private final Set<City> mUserSelectedCities = new ArraySet<>();
- /** The number of user selections at the top of the adapter to avoid indexing. */
+ /**
+ * The number of user selections at the top of the adapter to avoid indexing.
+ */
private int mOriginalUserSelectionCount;
- /** The precomputed section headers. */
+ /**
+ * The precomputed section headers.
+ */
private String[] mSectionHeaders;
- /** The corresponding location of each precomputed section header. */
+ /**
+ * The corresponding location of each precomputed section header.
+ */
private Integer[] mSectionHeaderPositions;
- /** Menu item controller for search. Search query is maintained here. */
+ /**
+ * Menu item controller for search. Search query is maintained here.
+ */
private final SearchMenuItemController mSearchMenuItemController;
public CityAdapter(Context context, SearchMenuItemController searchMenuItemController) {
@@ -506,8 +539,13 @@ public final class CitySelectionActivity extends BaseActivity {
return !TextUtils.isEmpty(mSearchMenuItemController.getQueryText().trim());
}
- private Collection<City> getSelectedCities() { return mUserSelectedCities; }
- private boolean hasHeader() { return !isFiltering() && mOriginalUserSelectionCount > 0; }
+ private Collection<City> getSelectedCities() {
+ return mUserSelectedCities;
+ }
+
+ private boolean hasHeader() {
+ return !isFiltering() && mOriginalUserSelectionCount > 0;
+ }
private DataModel.CitySort getCitySort() {
return DataModel.getDataModel().getCitySort();