aboutsummaryrefslogtreecommitdiff
path: root/doze/res
diff options
context:
space:
mode:
authorFedor917 <cryscript@gmail.com>2016-11-10 15:53:00 +0700
committerFedor917 <cryscript@gmail.com>2016-11-10 15:53:00 +0700
commitf7102b858dc849cc94255bc96f95b880dfd93452 (patch)
tree3e6164b0b02bb62f7093ddc44bbbaebaf44aacf8 /doze/res
parentcc834f0c4bb0ce51baddc42d11935438bf63394a (diff)
Initialising brunch based on davidevinavil device tree (CM14.0 branch)
Diffstat (limited to 'doze/res')
-rw-r--r--doze/res/drawable/switchbar_background.xml21
-rw-r--r--doze/res/layout/doze.xml28
-rw-r--r--doze/res/layout/switch_bar.xml48
-rw-r--r--doze/res/values-gl-rES/strings.xml15
-rw-r--r--doze/res/values-iw/strings.xml1
-rw-r--r--doze/res/values-nl/strings.xml2
-rw-r--r--doze/res/values-pl/strings.xml2
-rw-r--r--doze/res/values-sv/strings.xml2
-rw-r--r--doze/res/values/colors.xml23
-rw-r--r--doze/res/values/strings.xml13
-rw-r--r--doze/res/values/styles.xml34
-rw-r--r--doze/res/xml/doze_settings.xml32
12 files changed, 169 insertions, 52 deletions
diff --git a/doze/res/drawable/switchbar_background.xml b/doze/res/drawable/switchbar_background.xml
new file mode 100644
index 0000000..45f1578
--- /dev/null
+++ b/doze/res/drawable/switchbar_background.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+ android:color="?android:attr/colorControlHighlight">
+ <item android:drawable="@color/switch_bar_background" />
+</ripple>
+
diff --git a/doze/res/layout/doze.xml b/doze/res/layout/doze.xml
new file mode 100644
index 0000000..941cdf6
--- /dev/null
+++ b/doze/res/layout/doze.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent">
+
+ <include layout="@layout/switch_bar" />
+
+</LinearLayout>
+
diff --git a/doze/res/layout/switch_bar.xml b/doze/res/layout/switch_bar.xml
new file mode 100644
index 0000000..f98de96
--- /dev/null
+++ b/doze/res/layout/switch_bar.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/switch_bar"
+ android:layout_width="match_parent"
+ android:layout_height="?android:attr/actionBarSize"
+ android:background="@drawable/switchbar_background"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:clickable="true"
+ android:gravity="center">
+
+ <TextView android:id="@+id/switch_text"
+ android:layout_height="wrap_content"
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:layout_gravity="center_vertical"
+ android:paddingStart="48dp"
+ android:maxLines="2"
+ android:ellipsize="end"
+ android:textAppearance="@android:style/TextAppearance.Material.Title"
+ android:textColor="?android:attr/textColorPrimaryInverse"
+ android:textAlignment="viewStart"
+ android:text="@string/switch_bar_on" />
+
+ <Switch
+ android:id="@android:id/switch_widget"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:background="@null"
+ android:theme="@style/ThemeOverlay.SwitchBar" />
+
+</LinearLayout>
diff --git a/doze/res/values-gl-rES/strings.xml b/doze/res/values-gl-rES/strings.xml
index 809934c..c023c08 100644
--- a/doze/res/values-gl-rES/strings.xml
+++ b/doze/res/values-gl-rES/strings.xml
@@ -13,22 +13,7 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="ambient_display_title">Visualización ambiente</string>
- <string name="ambient_display_summary">Activar a pantalla ao recibir notificacións</string>
- <string name="always_enabled_title">Sempre activo</string>
- <string name="always_enabled_summary">Atender ao eventos do sensor así que se apague a pantalla</string>
<!-- Tilt sensor -->
- <string name="tilt_sensor_title">Sensor de inclinación</string>
- <string name="pick_up_title">Coller</string>
- <string name="pick_up_summary">Amosar notificacións ao coller o dispositivo</string>
<!-- Proximity sensor -->
- <string name="priximity_sensor_title">Sensor de proximidade</string>
- <string name="hand_wave_gesture_title">Pasar a man</string>
- <string name="hand_wave_gesture_summary">Amosar notificacións ao pasar a man</string>
- <string name="pocket_gesture_title">Peto</string>
- <string name="pocket_gesture_summary">Amosar notificacións ao sacar do peto</string>
<!-- Help text -->
- <string name="dlg_ok">ACEPTAR</string>
- <string name="doze_settings_help_title">Axuda</string>
- <string name="doze_settings_help_text">Estas características usan eventos do sensor para amosar unha notificación latente. O sensor seleccionado habilitarase só cando reciba unha notificación axudando a reducir o consumo da batería. Tamén existe unha opción para activar o sensor así que se apague a pantalla, pero isto causará un maior uso da batería.</string>
</resources>
diff --git a/doze/res/values-iw/strings.xml b/doze/res/values-iw/strings.xml
index b3ba98f..caff68b 100644
--- a/doze/res/values-iw/strings.xml
+++ b/doze/res/values-iw/strings.xml
@@ -27,5 +27,4 @@
<!-- Help text -->
<string name="dlg_ok">אישור</string>
<string name="doze_settings_help_title">עזרה</string>
- <string name="doze_settings_help_text">התכונות נעזרות בחיישני אירועים כדי להפעיל הדגשת התראות עם Doze. החיישן הנבחר מופעל רק כאשר המכשיר מקבל התראה, מה שעוזר להקטין את השימוש בסוללה. בנוסף, יש אפשרות להפעיל את החיישן הנבחר ברגע שהמסך נכבה, מה שעלול לגרום לשימוש רב יותר בסוללה.</string>
</resources>
diff --git a/doze/res/values-nl/strings.xml b/doze/res/values-nl/strings.xml
index b803eeb..a9db278 100644
--- a/doze/res/values-nl/strings.xml
+++ b/doze/res/values-nl/strings.xml
@@ -30,5 +30,5 @@
<!-- Help text -->
<string name="dlg_ok">OK</string>
<string name="doze_settings_help_title">Help</string>
- <string name="doze_settings_help_text">Deze functies gebruiken sensoren om een Doze-puls te versturen. De gekozen sensor is alleen ingeschakeld als het apparaat een melding ontvangt. Dit helpt het accugebruik te verminderen. Er is ook een optie om de sensor te activeren zodra het scherm uitschakelt, maar dit leidt tot hoger accugebruik.</string>
+ <string name="doze_settings_help_text">Deze functies gebruiken sensoren om een Doze-puls te versturen. De gekozen sensor is alleen ingeschakeld als het apparaat een melding ontvangt. Dit helpt het batterijgebruik te verminderen. Er is ook een optie om de sensor te activeren zodra het scherm uitschakelt, maar dit leidt tot hoger batterijgebruik.</string>
</resources>
diff --git a/doze/res/values-pl/strings.xml b/doze/res/values-pl/strings.xml
index ec0b8c6..aa010bf 100644
--- a/doze/res/values-pl/strings.xml
+++ b/doze/res/values-pl/strings.xml
@@ -15,7 +15,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="ambient_display_title">Aktywny wyświetlacz</string>
<string name="ambient_display_summary">Wybudź ekran po odebraniu powiadomienia</string>
- <string name="always_enabled_title">Zawsze włączone</string>
<string name="always_enabled_summary">Nasłuchiwanie zdarzeń z czujników zaraz po wyłączeniu ekranu</string>
<!-- Tilt sensor -->
<string name="tilt_sensor_title">Czujnik pochylenia</string>
@@ -29,5 +28,4 @@
<!-- Help text -->
<string name="dlg_ok">OK</string>
<string name="doze_settings_help_title">Pomoc</string>
- <string name="doze_settings_help_text">Te funkcje używają czujników, aby pokazywać powiadomienia tylko w odpowiednim momencie. Czujniki są wykorzystywane, kiedy telefon odbierze powiadomienie. Pozwala to w oszczędzaniu baterii. Istnieje również możliwość, aby włączyć wybrany czujnik zaraz po wyłączeniu ekranu, spowoduje to większe zużycie baterii.</string>
</resources>
diff --git a/doze/res/values-sv/strings.xml b/doze/res/values-sv/strings.xml
index 225a2b8..030a831 100644
--- a/doze/res/values-sv/strings.xml
+++ b/doze/res/values-sv/strings.xml
@@ -15,10 +15,8 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Tilt sensor -->
<string name="pick_up_title">Plocka upp</string>
- <string name="pick_up_summary">Pulsera aviseringarna när enheten plockas upp</string>
<!-- Proximity sensor -->
<string name="priximity_sensor_title">Närhetscensor</string>
- <string name="pocket_gesture_summary">Pulsera aviseringar när telefonen tas upp ur fickan</string>
<!-- Help text -->
<string name="dlg_ok">OK</string>
<string name="doze_settings_help_title">Hjälp</string>
diff --git a/doze/res/values/colors.xml b/doze/res/values/colors.xml
new file mode 100644
index 0000000..d598598
--- /dev/null
+++ b/doze/res/values/colors.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2010, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<resources>
+ <color name="switch_bar_background">#ff37474f</color>
+ <color name="switch_accent_color">#ff7fcac3</color>
+ <color name="system_secondary_color">#ff37474F</color>
+</resources>
diff --git a/doze/res/values/strings.xml b/doze/res/values/strings.xml
index 9643190..fed5b05 100644
--- a/doze/res/values/strings.xml
+++ b/doze/res/values/strings.xml
@@ -13,11 +13,16 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Label for feature switch [CHAR LIMIT=30] -->
+ <string name="switch_bar_on">On</string>
+
+ <!-- Label for feature switch [CHAR LIMIT=30] -->
+ <string name="switch_bar_off">Off</string>
+
<string name="ambient_display_title">Ambient display</string>
<string name="ambient_display_summary">Wake screen when you receive notifications</string>
-
- <string name="always_enabled_title">Always enable</string>
- <string name="always_enabled_summary">Listen for sensor events as soon as the screen turns off</string>
+ <string name="ambient_display_summary_on">Screen will wake when you receive notifications</string>
+ <string name="ambient_display_summary_off">Screen will not wake when you receive notifications</string>
<!-- Tilt sensor -->
<string name="tilt_sensor_title">Tilt sensor</string>
@@ -34,5 +39,5 @@
<!-- Help text -->
<string name="dlg_ok">OK</string>
<string name="doze_settings_help_title">Help</string>
- <string name="doze_settings_help_text">These features use sensor events to launch a doze notification pulse. The chosen sensor is only enabled when the device receives a notification, this helps to reduce battery usage. There is also an option to enable the chosen sensor as soon as the screen turns off, this will cause higher battery usage.</string>
+ <string name="doze_settings_help_text">These features use sensor events to launch a doze notification pulse, this will cause higher battery usage.</string>
</resources>
diff --git a/doze/res/values/styles.xml b/doze/res/values/styles.xml
new file mode 100644
index 0000000..78d2d59
--- /dev/null
+++ b/doze/res/values/styles.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+ <style name="DozeSettings" parent="@android:style/Theme.Material.Settings">
+ <item name="android:windowActionBar">false</item>
+ <item name="preferenceTheme">@style/DozePreferenceTheme</item>
+ </style>
+
+ <style name="DozePreferenceTheme" parent="@android:style/Theme.Material.Settings">
+ <item name="dropdownPreferenceStyle">@style/Preference.DropDown.Material</item>
+ </style>
+
+ <style name="ThemeOverlay.SwitchBar" parent="@android:style/ThemeOverlay">
+ <item name="android:colorAccent">@color/switch_accent_color</item>
+ </style>
+
+ <style name="ThemeOverlay.SwitchBar.Secondary" parent="@android:style/ThemeOverlay">
+ <item name="android:colorAccent">@color/system_secondary_color</item>
+ </style>
+
+</resources>
diff --git a/doze/res/xml/doze_settings.xml b/doze/res/xml/doze_settings.xml
index 09e27b5..acc19d2 100644
--- a/doze/res/xml/doze_settings.xml
+++ b/doze/res/xml/doze_settings.xml
@@ -14,13 +14,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
-
- <SwitchPreference
- android:key="ambient_display"
- android:defaultValue="true"
- android:title="@string/ambient_display_title"
- android:summary="@string/ambient_display_summary" />
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:cm="http://schemas.android.com/apk/res/cyanogenmod.platform">
<PreferenceCategory
android:key="tilt_sensor"
@@ -30,15 +25,7 @@
android:key="pick_up"
android:defaultValue="false"
android:title="@string/pick_up_title"
- android:summary="@string/pick_up_summary"
- android:dependency="ambient_display" />
-
- <SwitchPreference
- android:key="tilt_always"
- android:defaultValue="false"
- android:title="@string/always_enabled_title"
- android:summary="@string/always_enabled_summary"
- android:dependency="ambient_display" />
+ android:summary="@string/pick_up_summary" />
</PreferenceCategory>
@@ -50,22 +37,13 @@
android:key="gesture_hand_wave"
android:defaultValue="false"
android:title="@string/hand_wave_gesture_title"
- android:summary="@string/hand_wave_gesture_summary"
- android:dependency="ambient_display" />
+ android:summary="@string/hand_wave_gesture_summary" />
<SwitchPreference
android:key="gesture_pocket"
android:defaultValue="false"
android:title="@string/pocket_gesture_title"
- android:summary="@string/pocket_gesture_summary"
- android:dependency="ambient_display" />
-
- <SwitchPreference
- android:key="proximity_always"
- android:defaultValue="false"
- android:title="@string/always_enabled_title"
- android:summary="@string/always_enabled_summary"
- android:dependency="ambient_display" />
+ android:summary="@string/pocket_gesture_summary" />
</PreferenceCategory>