Merge "Import translations. DO NOT MERGE" into ics-ub-clock-amazon
diff --git a/res/layout/alarm_time.xml b/res/layout/alarm_time.xml
index a54e4e9..0178b9c 100644
--- a/res/layout/alarm_time.xml
+++ b/res/layout/alarm_time.xml
@@ -16,6 +16,8 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:dc="http://schemas.android.com/apk/res-auto"
+
android:id="@+id/alarm_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -33,45 +35,18 @@
android:layout_marginEnd="12dp"
android:layout_marginTop="12dp"
android:orientation="horizontal">
- <com.android.deskclock.DigitalClock
+ <com.android.deskclock.widget.TextTime
android:id="@+id/digital_clock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:gravity="top"
- android:clickable="true"
- android:layoutDirection="ltr"
- android:background="@drawable/item_background">
- <TextView
- android:id="@+id/timeDisplayHours"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingRight="@dimen/mini_time_margin_right"
- android:paddingEnd="@dimen/mini_time_margin_right"
- android:singleLine="true"
- android:ellipsize="none"
- style="@style/small_light"
- android:textSize="@dimen/alarm_time_font_size"
- android:textColor="@color/clock_white"/>
- <TextView
- android:id="@+id/timeDisplayMinutes"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- style="@style/small_light"
- android:textSize="@dimen/alarm_time_font_size"
- android:singleLine="true"
- android:ellipsize="none"
- android:textColor="@color/clock_white" />
- <TextView
- android:id="@+id/am_pm"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- style="@style/label"
- android:paddingLeft="6dp"
- android:paddingStart="6dp"
- android:singleLine="true"
- android:ellipsize="none"
- android:textColor="@color/clock_white" />
- </com.android.deskclock.DigitalClock>
+ style="@style/medium_light"
+ android:textSize="@dimen/alarm_time_font_size"
+ android:textColor="@color/clock_white"
+ android:baselineAligned="true"
+ android:layout_gravity="center"
+ android:gravity="center"
+ dc:format12Hour="@string/clock_12_hours_format_with_ampm"
+ dc:format24Hour="@string/widget_24_hours_format"/>
<Space
android:layout_height="match_parent"
android:layout_width="0dip"
diff --git a/res/values-af/donottranslate.xml b/res/values-af/donottranslate.xml
deleted file mode 100644
index e35410a..0000000
--- a/res/values-af/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E MMMM d</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">E MMMM d</string>
-</resources>
diff --git a/res/values-am/donottranslate.xml b/res/values-am/donottranslate.xml
deleted file mode 100644
index b547ed9..0000000
--- a/res/values-am/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E MMMM d</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">E MMMM d</string>
-</resources>
diff --git a/res/values-ar/donottranslate.xml b/res/values-ar/donottranslate.xml
deleted file mode 100644
index f5953bb..0000000
--- a/res/values-ar/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E d MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">E d MMMM</string>
-</resources>
diff --git a/res/values-be/donottranslate.xml b/res/values-be/donottranslate.xml
deleted file mode 100644
index c719d83..0000000
--- a/res/values-be/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">MMMM d, EEEE</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">MMMM d, EEEE</string>
-</resources>
diff --git a/res/values-bg/donottranslate.xml b/res/values-bg/donottranslate.xml
deleted file mode 100644
index d4ffee6..0000000
--- a/res/values-bg/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">d MMMM, EEE</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">d MMMM, EEEE</string>
-</resources>
diff --git a/res/values-ca/donottranslate.xml b/res/values-ca/donottranslate.xml
deleted file mode 100644
index 0bac85a..0000000
--- a/res/values-ca/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE d MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">EEEE d MMMM</string>
-</resources>
diff --git a/res/values-cs/donottranslate.xml b/res/values-cs/donottranslate.xml
deleted file mode 100644
index 544a245..0000000
--- a/res/values-cs/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE, d. MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">EEEE, d. MMMM</string>
-</resources>
diff --git a/res/values-da/donottranslate.xml b/res/values-da/donottranslate.xml
deleted file mode 100644
index 0b8a83b..0000000
--- a/res/values-da/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE d. MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">EEEE d. MMMM</string>
-</resources>
diff --git a/res/values-de/donottranslate.xml b/res/values-de/donottranslate.xml
deleted file mode 100644
index 544a245..0000000
--- a/res/values-de/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE, d. MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">EEEE, d. MMMM</string>
-</resources>
diff --git a/res/values-el/donottranslate.xml b/res/values-el/donottranslate.xml
deleted file mode 100644
index 6c81f90..0000000
--- a/res/values-el/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE, d MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">EEEE, d MMMM</string>
-</resources>
diff --git a/res/values-en-rGB/donottranslate.xml b/res/values-en-rGB/donottranslate.xml
deleted file mode 100644
index a0df6ce..0000000
--- a/res/values-en-rGB/donottranslate.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 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">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE d MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">EEEE d MMMM</string>
-</resources>
diff --git a/res/values-es-rUS/donottranslate.xml b/res/values-es-rUS/donottranslate.xml
deleted file mode 100644
index 831eaa4..0000000
--- a/res/values-es-rUS/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE d \'de\' MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">EEEE d \'de\' MMMM</string>
-</resources>
diff --git a/res/values-es/donottranslate.xml b/res/values-es/donottranslate.xml
deleted file mode 100644
index 831eaa4..0000000
--- a/res/values-es/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE d \'de\' MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">EEEE d \'de\' MMMM</string>
-</resources>
diff --git a/res/values-et/donottranslate.xml b/res/values-et/donottranslate.xml
deleted file mode 100644
index b547ed9..0000000
--- a/res/values-et/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E MMMM d</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">E MMMM d</string>
-</resources>
diff --git a/res/values-fa/donottranslate.xml b/res/values-fa/donottranslate.xml
deleted file mode 100644
index 1243e1a..0000000
--- a/res/values-fa/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E d LLLL</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">E d LLLL</string>
-</resources>
diff --git a/res/values-fi/donottranslate.xml b/res/values-fi/donottranslate.xml
deleted file mode 100644
index 9a31310..0000000
--- a/res/values-fi/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E d. MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">E d. MMMM</string>
-</resources>
diff --git a/res/values-fr/donottranslate.xml b/res/values-fr/donottranslate.xml
deleted file mode 100644
index 79e5315..0000000
--- a/res/values-fr/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE d MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">EEE d MMMM</string>
-</resources>
diff --git a/res/values-hi/donottranslate.xml b/res/values-hi/donottranslate.xml
deleted file mode 100644
index b0ae91f..0000000
--- a/res/values-hi/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E, d MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">>E, d MMMM</string>
-</resources>
diff --git a/res/values-hr/donottranslate.xml b/res/values-hr/donottranslate.xml
deleted file mode 100644
index c5ea4ab..0000000
--- a/res/values-hr/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E, d. MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">E, d. MMMM</string>
-</resources>
diff --git a/res/values-hu/donottranslate.xml b/res/values-hu/donottranslate.xml
deleted file mode 100644
index f55f933..0000000
--- a/res/values-hu/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE MMMM d</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">EEEE MMMM d</string>
-</resources>
diff --git a/res/values-in/donottranslate.xml b/res/values-in/donottranslate.xml
deleted file mode 100644
index b547ed9..0000000
--- a/res/values-in/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E MMMM d</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">E MMMM d</string>
-</resources>
diff --git a/res/values-it/donottranslate.xml b/res/values-it/donottranslate.xml
deleted file mode 100644
index 79e5315..0000000
--- a/res/values-it/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE d MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">EEE d MMMM</string>
-</resources>
diff --git a/res/values-iw/donottranslate.xml b/res/values-iw/donottranslate.xml
deleted file mode 100644
index b547ed9..0000000
--- a/res/values-iw/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E MMMM d</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">E MMMM d</string>
-</resources>
diff --git a/res/values-ja/donottranslate.xml b/res/values-ja/donottranslate.xml
deleted file mode 100644
index 9909d12..0000000
--- a/res/values-ja/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">M月d日 (E)</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">M月d日 (E)</string>
-</resources>
diff --git a/res/values-ko/donottranslate.xml b/res/values-ko/donottranslate.xml
deleted file mode 100644
index 3b5da12..0000000
--- a/res/values-ko/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">MMMM d일 EEEE</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">MMMM d일 EEEE</string>
-</resources>
diff --git a/res/values-lt/donottranslate.xml b/res/values-lt/donottranslate.xml
deleted file mode 100644
index b547ed9..0000000
--- a/res/values-lt/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E MMMM d</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">E MMMM d</string>
-</resources>
diff --git a/res/values-lv/donottranslate.xml b/res/values-lv/donottranslate.xml
deleted file mode 100644
index c5ea4ab..0000000
--- a/res/values-lv/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E, d. MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">E, d. MMMM</string>
-</resources>
diff --git a/res/values-ms/donottranslate.xml b/res/values-ms/donottranslate.xml
deleted file mode 100644
index b547ed9..0000000
--- a/res/values-ms/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E MMMM d</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">E MMMM d</string>
-</resources>
diff --git a/res/values-nb/donottranslate.xml b/res/values-nb/donottranslate.xml
deleted file mode 100644
index 0b8a83b..0000000
--- a/res/values-nb/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE d. MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">EEEE d. MMMM</string>
-</resources>
diff --git a/res/values-nl/donottranslate.xml b/res/values-nl/donottranslate.xml
deleted file mode 100644
index 0bac85a..0000000
--- a/res/values-nl/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE d MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">EEEE d MMMM</string>
-</resources>
diff --git a/res/values-pl/donottranslate.xml b/res/values-pl/donottranslate.xml
deleted file mode 100644
index 6c81f90..0000000
--- a/res/values-pl/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE, d MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">EEEE, d MMMM</string>
-</resources>
diff --git a/res/values-pt-rPT/donottranslate.xml b/res/values-pt-rPT/donottranslate.xml
deleted file mode 100644
index 7c55a56..0000000
--- a/res/values-pt-rPT/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE, d \'de\' MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">EEE, d \'de\' MMMM</string>
-</resources>
diff --git a/res/values-pt/donottranslate.xml b/res/values-pt/donottranslate.xml
deleted file mode 100644
index 7c55a56..0000000
--- a/res/values-pt/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE, d \'de\' MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">EEE, d \'de\' MMMM</string>
-</resources>
diff --git a/res/values-ro/donottranslate.xml b/res/values-ro/donottranslate.xml
deleted file mode 100644
index e9f4c41..0000000
--- a/res/values-ro/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E, d MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">E, d MMMM</string>
-</resources>
diff --git a/res/values-ru/donottranslate.xml b/res/values-ru/donottranslate.xml
deleted file mode 100644
index 6c81f90..0000000
--- a/res/values-ru/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE, d MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">EEEE, d MMMM</string>
-</resources>
diff --git a/res/values-sk/donottranslate.xml b/res/values-sk/donottranslate.xml
deleted file mode 100644
index c5ea4ab..0000000
--- a/res/values-sk/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E, d. MMMM</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">E, d. MMMM</string>
-</resources>
diff --git a/res/values-sl/donottranslate.xml b/res/values-sl/donottranslate.xml
deleted file mode 100644
index b547ed9..0000000
--- a/res/values-sl/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E MMMM d</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">E MMMM d</string>
-</resources>
diff --git a/res/values-sr/donottranslate.xml b/res/values-sr/donottranslate.xml
deleted file mode 100644
index b547ed9..0000000
--- a/res/values-sr/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E MMMM d</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">E MMMM d</string>
-</resources>
diff --git a/res/values-sv/donottranslate.xml b/res/values-sv/donottranslate.xml
deleted file mode 100644
index 06142ed..0000000
--- a/res/values-sv/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE d MMMM</string>
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="full_wday_month_day_no_year">EEEE d MMMM</string>
-</resources>
diff --git a/res/values-sw/donottranslate.xml b/res/values-sw/donottranslate.xml
deleted file mode 100644
index 3c0873d..0000000
--- a/res/values-sw/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">>E MMMM d</string>
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="full_wday_month_day_no_year">>E MMMM d</string>
-</resources>
diff --git a/res/values-th/donottranslate.xml b/res/values-th/donottranslate.xml
deleted file mode 100644
index 733fe80..0000000
--- a/res/values-th/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">>E d MMMM</string>
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="full_wday_month_day_no_year">>E d MMMM</string>
-</resources>
diff --git a/res/values-tl/donottranslate.xml b/res/values-tl/donottranslate.xml
deleted file mode 100644
index 3c0873d..0000000
--- a/res/values-tl/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">>E MMMM d</string>
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="full_wday_month_day_no_year">>E MMMM d</string>
-</resources>
diff --git a/res/values-tr/donottranslate.xml b/res/values-tr/donottranslate.xml
deleted file mode 100644
index 7c8f0b1..0000000
--- a/res/values-tr/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">dd MMMM EEE</string>
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="full_wday_month_day_no_year">dd MMMM EEEE</string>
-</resources>
diff --git a/res/values-uk/donottranslate.xml b/res/values-uk/donottranslate.xml
deleted file mode 100644
index 92e8a26..0000000
--- a/res/values-uk/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E, d MMMM</string>
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="full_wday_month_day_no_year">E, d MMMM</string>
-</resources>
diff --git a/res/values-vi/donottranslate.xml b/res/values-vi/donottranslate.xml
deleted file mode 100644
index bdf1a26..0000000
--- a/res/values-vi/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E d MMMM</string>
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="full_wday_month_day_no_year">E d MMMM</string>
-</resources>
diff --git a/res/values-zh-rCN/donottranslate.xml b/res/values-zh-rCN/donottranslate.xml
deleted file mode 100644
index a3bca3c..0000000
--- a/res/values-zh-rCN/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">M 月 d 日 E</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">M 月 d 日 E</string>
-</resources>
diff --git a/res/values-zh-rTW/donottranslate.xml b/res/values-zh-rTW/donottranslate.xml
deleted file mode 100644
index 9918967..0000000
--- a/res/values-zh-rTW/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">M 月 d 日E</string>
- <!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">M 月 d 日E</string>
-</resources>
diff --git a/res/values-zu/donottranslate.xml b/res/values-zu/donottranslate.xml
deleted file mode 100644
index 365325c..0000000
--- a/res/values-zu/donottranslate.xml
+++ /dev/null
@@ -1,22 +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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">E MMMM d</string>
- <!-- String matching the lock screen format for displaying the date. -->
- <string name="full_wday_month_day_no_year">E MMMM d</string>
-</resources>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 417bb50..64fcf99 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -73,4 +73,17 @@
<attr name="jewelColor" format="color"/>
</declare-styleable>
+ <declare-styleable name="TextTime">
+ <!-- Specifies the formatting pattern used to show the time and/or date
+ in 12-hour mode. Please refer to {@link android.text.format.DateFormat}
+ for a complete description of accepted formatting patterns.
+ The default pattern is "h:mm a". -->
+ <attr name="format12Hour" format="string"/>
+ <!-- Specifies the formatting pattern used to show the time and/or date
+ in 24-hour mode. Please refer to {@link android.text.format.DateFormat}
+ for a complete description of accepted formatting patterns.
+ The default pattern is "H:mm". -->
+ <attr name="format24Hour" format="string"/>
+ </declare-styleable>
+
</resources>
diff --git a/res/values/donottranslate.xml b/res/values/donottranslate.xml
index faa9a75..eec8127 100644
--- a/res/values/donottranslate.xml
+++ b/res/values/donottranslate.xml
@@ -16,9 +16,9 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- String matching the lock screen format for displaying the date. -->
- <string name="abbrev_wday_month_day_no_year">EEE, MMMM d</string>
+ <string name="abbrev_wday_month_day_no_year">EEEMMMMd</string>
<!-- Format for describing the date, for accessibility. -->
- <string name="full_wday_month_day_no_year">EEEE, MMMM d</string>
+ <string name="full_wday_month_day_no_year">EEEEMMMMd</string>
<!-- Default clock style. -->
<string name="default_clock_style">digital</string>
</resources>
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
index cde23df..9e9675b 100644
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
@@ -28,6 +28,7 @@
import android.os.Bundle;
import android.provider.Settings;
import android.text.TextUtils;
+import android.text.format.DateFormat;
import android.util.Log;
import android.view.View;
import android.widget.RemoteViews;
@@ -39,6 +40,8 @@
import com.android.deskclock.worldclock.Cities;
import com.android.deskclock.worldclock.CitiesActivity;
+import java.util.Locale;
+
public class DigitalAppWidgetProvider extends AppWidgetProvider {
private static final String TAG = "DigitalAppWidgetProvider";
@@ -166,6 +169,12 @@
refreshAlarm(context, widget);
WidgetUtils.setClockSize(context, widget, ratio);
+ // Set today's date format
+ CharSequence dateFormat = DateFormat.getBestDateTimePattern(Locale.getDefault(),
+ context.getString(R.string.abbrev_wday_month_day_no_year));
+ widget.setCharSequence(R.id.date, "setFormat12Hour", dateFormat);
+ widget.setCharSequence(R.id.date, "setFormat24Hour", dateFormat);
+
// Set up R.id.digital_appwidget_listview to use a remote views adapter
// That remote views adapter connects to a RemoteViewsService through intent.
final Intent intent = new Intent(context, DigitalAppWidgetService.class);
diff --git a/src/com/android/deskclock/AlarmClockFragment.java b/src/com/android/deskclock/AlarmClockFragment.java
index ac44a8d..84adcd5 100644
--- a/src/com/android/deskclock/AlarmClockFragment.java
+++ b/src/com/android/deskclock/AlarmClockFragment.java
@@ -71,6 +71,7 @@
import com.android.deskclock.provider.AlarmInstance;
import com.android.deskclock.provider.DaysOfWeek;
import com.android.deskclock.widget.ActionableToastBar;
+import com.android.deskclock.widget.TextTime;
import java.text.DateFormatSymbols;
import java.util.Calendar;
@@ -725,7 +726,7 @@
// views for optimization
LinearLayout alarmItem;
- DigitalClock clock;
+ TextTime clock;
Switch onoff;
TextView daysOfWeek;
TextView label;
@@ -993,8 +994,7 @@
// standard view holder optimization
final ItemHolder holder = new ItemHolder();
holder.alarmItem = (LinearLayout) view.findViewById(R.id.alarm_item);
- holder.clock = (DigitalClock) view.findViewById(R.id.digital_clock);
- holder.clock.setLive(false);
+ holder.clock = (TextTime) view.findViewById(R.id.digital_clock);
holder.onoff = (Switch) view.findViewById(R.id.onoff);
holder.onoff.setTypeface(mRobotoNormal);
holder.daysOfWeek = (TextView) view.findViewById(R.id.daysOfWeek);
@@ -1063,7 +1063,7 @@
setItemAlpha(itemHolder, itemHolder.onoff.isChecked());
}
- itemHolder.clock.updateTime(alarm.hour, alarm.minutes);
+ itemHolder.clock.setTime(alarm.hour, alarm.minutes);
itemHolder.clock.setClickable(true);
itemHolder.clock.setOnClickListener(new View.OnClickListener() {
@Override
diff --git a/src/com/android/deskclock/DigitalClock.java b/src/com/android/deskclock/DigitalClock.java
deleted file mode 100644
index bdcf29b..0000000
--- a/src/com/android/deskclock/DigitalClock.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Copyright (C) 2008 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.
- */
-
-package com.android.deskclock;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.database.ContentObserver;
-import android.graphics.Typeface;
-import android.os.Handler;
-import android.provider.Settings;
-import android.text.format.DateFormat;
-import android.util.AttributeSet;
-import android.view.View;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import java.text.DateFormatSymbols;
-import java.util.Calendar;
-import java.util.TimeZone;
-
-/**
- * Displays the time
- */
-public class DigitalClock extends LinearLayout {
-
- private final static String HOURS_24 = "kk";
- private final static String HOURS = "h";
- private final static String MINUTES = "mm";
-
- private Calendar mCalendar;
- private String mHoursFormat;
- private TextView mTimeDisplayHours, mTimeDisplayMinutes;
- private AmPm mAmPm;
- private ContentObserver mFormatChangeObserver;
- private boolean mLive = true;
- private boolean mAttached;
- private final Typeface mRobotoThin;
- private String mTimeZoneId;
-
-
- /* called by system on minute ticks */
- private final Handler mHandler = new Handler();
- private final BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- if (mLive && intent.getAction().equals(
- Intent.ACTION_TIMEZONE_CHANGED)) {
- mCalendar = Calendar.getInstance();
- }
- // Post a runnable to avoid blocking the broadcast.
- mHandler.post(new Runnable() {
- public void run() {
- updateTime();
- }
- });
- }
- };
-
- static class AmPm {
- private final TextView mAmPm;
- private final String mAmString, mPmString;
-
- AmPm(View parent) {
- mAmPm = (TextView) parent.findViewById(R.id.am_pm);
-
- String[] ampm = new DateFormatSymbols().getAmPmStrings();
- mAmString = ampm[0];
- mPmString = ampm[1];
- }
-
- void setShowAmPm(boolean show) {
- mAmPm.setVisibility(show ? View.VISIBLE : View.GONE);
- }
-
- void setIsMorning(boolean isMorning) {
- mAmPm.setText(isMorning ? mAmString : mPmString);
- }
-
- CharSequence getAmPmText() {
- return mAmPm.getText();
- }
- }
-
- private class FormatChangeObserver extends ContentObserver {
- public FormatChangeObserver() {
- super(new Handler());
- }
- @Override
- public void onChange(boolean selfChange) {
- setDateFormat();
- updateTime();
- }
- }
-
- public DigitalClock(Context context) {
- this(context, null);
- }
-
- public DigitalClock(Context context, AttributeSet attrs) {
- super(context, attrs);
- mRobotoThin = Typeface.createFromAsset(context.getAssets(),"fonts/Roboto-Thin.ttf");
- }
-
- @Override
- protected void onFinishInflate() {
- super.onFinishInflate();
-
- mTimeDisplayHours = (TextView)findViewById(R.id.timeDisplayHours);
- mTimeDisplayHours.setTypeface(mRobotoThin);
- mTimeDisplayMinutes = (TextView)findViewById(R.id.timeDisplayMinutes);
- mTimeDisplayMinutes.setTypeface(mRobotoThin);
- mAmPm = new AmPm(this);
- mCalendar = Calendar.getInstance();
-
- setDateFormat();
- }
-
- @Override
- protected void onAttachedToWindow() {
- super.onAttachedToWindow();
-
- if (Log.LOGV) Log.v("onAttachedToWindow " + this);
-
- if (mAttached) return;
- mAttached = true;
-
- if (mLive) {
- /* monitor time ticks, time changed, timezone */
- IntentFilter filter = new IntentFilter();
- filter.addAction(Intent.ACTION_TIME_TICK);
- filter.addAction(Intent.ACTION_TIME_CHANGED);
- filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
- getContext().registerReceiver(mIntentReceiver, filter);
- }
-
- /* monitor 12/24-hour display preference */
- mFormatChangeObserver = new FormatChangeObserver();
- getContext().getContentResolver().registerContentObserver(
- Settings.System.CONTENT_URI, true, mFormatChangeObserver);
-
- updateTime();
- }
-
- @Override
- protected void onDetachedFromWindow() {
- super.onDetachedFromWindow();
-
- if (!mAttached) return;
- mAttached = false;
-
- if (mLive) {
- getContext().unregisterReceiver(mIntentReceiver);
- }
- getContext().getContentResolver().unregisterContentObserver(
- mFormatChangeObserver);
- }
-
-
- void updateTime(Calendar c) {
- mCalendar = c;
- updateTime();
- }
-
- public void updateTime(int hour, int minute) {
- // set the alarm text
- final Calendar c = Calendar.getInstance();
- c.set(Calendar.HOUR_OF_DAY, hour);
- c.set(Calendar.MINUTE, minute);
- mCalendar = c;
- updateTime();
- }
-
- private void updateTime() {
- if (mLive) {
- mCalendar.setTimeInMillis(System.currentTimeMillis());
- }
- if (mTimeZoneId != null) {
- mCalendar.setTimeZone(TimeZone.getTimeZone(mTimeZoneId));
- }
-
- StringBuilder fullTimeStr = new StringBuilder();
- CharSequence newTime = DateFormat.format(mHoursFormat, mCalendar);
- mTimeDisplayHours.setText(newTime);
- fullTimeStr.append(newTime);
- newTime = DateFormat.format(MINUTES, mCalendar);
- fullTimeStr.append(newTime);
- mTimeDisplayMinutes.setText(newTime);
-
- boolean isMorning = mCalendar.get(Calendar.AM_PM) == 0;
- mAmPm.setIsMorning(isMorning);
- if (!DateFormat.is24HourFormat(getContext())) {
- fullTimeStr.append(mAmPm.getAmPmText());
- }
-
- // Update accessibility string.
- setContentDescription(fullTimeStr);
- }
-
- private void setDateFormat() {
- boolean is24HourMode = DateFormat.is24HourFormat(getContext());
- mHoursFormat = is24HourMode ? HOURS_24 : HOURS;
- mAmPm.setShowAmPm(!is24HourMode);
- }
-
- void setLive(boolean live) {
- mLive = live;
- }
-
- public void setTimeZone(String id) {
- mTimeZoneId = id;
- updateTime();
- }
-}
diff --git a/src/com/android/deskclock/widget/TextTime.java b/src/com/android/deskclock/widget/TextTime.java
new file mode 100644
index 0000000..696b61a
--- /dev/null
+++ b/src/com/android/deskclock/widget/TextTime.java
@@ -0,0 +1,152 @@
+// Copyright 2013 Google Inc. All Rights Reserved.
+
+package com.android.deskclock.widget;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.database.ContentObserver;
+import android.net.Uri;
+import android.os.Handler;
+import android.provider.Settings;
+import android.text.format.DateFormat;
+import android.util.AttributeSet;
+import android.widget.TextView;
+
+import com.android.deskclock.R;
+
+import java.util.Calendar;
+
+/**
+ * Based on {@link android.widget.TextClock}, This widget displays a constant time of day using
+ * format specifiers. {@link android.widget.TextClock} Doesn't support a non ticking clock.
+ */
+public class TextTime extends TextView {
+ public static final CharSequence DEFAULT_FORMAT_12_HOUR = "h:mm a";
+
+ public static final CharSequence DEFAULT_FORMAT_24_HOUR = "H:mm";
+
+ private CharSequence mFormat12;
+ private CharSequence mFormat24;
+ private CharSequence mFormat;
+
+ private boolean mAttached;
+
+ private int mHour;
+ private int mMinute;
+
+ private final ContentObserver mFormatChangeObserver = new ContentObserver(new Handler()) {
+ @Override
+ public void onChange(boolean selfChange) {
+ chooseFormat();
+ updateTime();
+ }
+
+ @Override
+ public void onChange(boolean selfChange, Uri uri) {
+ chooseFormat();
+ updateTime();
+ }
+ };
+
+ @SuppressWarnings("UnusedDeclaration")
+ public TextTime(Context context) {
+ this(context, null);
+ }
+
+ @SuppressWarnings("UnusedDeclaration")
+ public TextTime(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public TextTime(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+
+ final TypedArray styledAttributes = context.obtainStyledAttributes(
+ attrs, R.styleable.TextTime, defStyle, 0);
+ try {
+ mFormat12 = styledAttributes.getText(R.styleable.TextTime_format12Hour);
+ mFormat24 = styledAttributes.getText(R.styleable.TextTime_format24Hour);
+ } finally {
+ styledAttributes.recycle();
+ }
+ chooseFormat();
+ }
+
+ @SuppressWarnings("UnusedDeclaration")
+ public CharSequence getFormat12Hour() {
+ return mFormat12;
+ }
+
+ @SuppressWarnings("UnusedDeclaration")
+ public void setFormat12Hour(CharSequence format) {
+ mFormat12 = format;
+
+ chooseFormat();
+ updateTime();
+ }
+
+ @SuppressWarnings("UnusedDeclaration")
+ public CharSequence getFormat24Hour() {
+ return mFormat24;
+ }
+
+ @SuppressWarnings("UnusedDeclaration")
+ public void setFormat24Hour(CharSequence format) {
+ mFormat24 = format;
+
+ chooseFormat();
+ updateTime();
+ }
+
+ private void chooseFormat() {
+ final boolean format24Requested = DateFormat.is24HourFormat(getContext());
+ if (format24Requested) {
+ mFormat = mFormat24 == null ? DEFAULT_FORMAT_24_HOUR : mFormat24;
+ } else {
+ mFormat = mFormat12 == null ? DEFAULT_FORMAT_12_HOUR : mFormat12;
+ }
+ }
+
+ @Override
+ protected void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ if (!mAttached) {
+ mAttached = true;
+ registerObserver();
+ updateTime();
+ }
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ if (mAttached) {
+ unregisterObserver();
+ mAttached = false;
+ }
+ }
+
+ private void registerObserver() {
+ final ContentResolver resolver = getContext().getContentResolver();
+ resolver.registerContentObserver(Settings.System.CONTENT_URI, true, mFormatChangeObserver);
+ }
+
+ private void unregisterObserver() {
+ final ContentResolver resolver = getContext().getContentResolver();
+ resolver.unregisterContentObserver(mFormatChangeObserver);
+ }
+
+ public void setTime(int hour, int minute) {
+ mHour = hour;
+ mMinute = minute;
+ updateTime();
+ }
+
+ private void updateTime() {
+ final Calendar calendar = Calendar.getInstance();
+ calendar.set(Calendar.HOUR_OF_DAY, mHour);
+ calendar.set(Calendar.MINUTE, mMinute);
+ setText(DateFormat.format(mFormat, calendar));
+ }
+}