From 8e48c247cff44d96ad69b7f7602adf75f44a1716 Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Fri, 14 Oct 2016 21:18:03 -0700 Subject: z2_plus: Bring DozeSettings up to date * Rework the UI with a SwitchBar * Change to the preferences support library and use fragments * Use all the new fancy RemotePreference stuff * Slot into display settings instead of the dashboard Change-Id: I0850f7d9558a14f739f752f76002db993381a0e5 --- doze/res/drawable/switchbar_background.xml | 21 +++++++++++++ doze/res/layout/doze.xml | 28 +++++++++++++++++ doze/res/layout/switch_bar.xml | 48 ++++++++++++++++++++++++++++++ doze/res/values/colors.xml | 23 ++++++++++++++ doze/res/values/strings.xml | 10 ++++++- doze/res/values/styles.xml | 34 +++++++++++++++++++++ doze/res/xml/doze_settings.xml | 18 ++++------- 7 files changed, 168 insertions(+), 14 deletions(-) create mode 100644 doze/res/drawable/switchbar_background.xml create mode 100644 doze/res/layout/doze.xml create mode 100644 doze/res/layout/switch_bar.xml create mode 100644 doze/res/values/colors.xml create mode 100644 doze/res/values/styles.xml (limited to 'doze/res') 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 @@ + + + + + + + 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 @@ + + + + + + + + + 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 @@ + + + + + + + + + + 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 @@ + + + + #ff37474f + #ff7fcac3 + #ff37474F + diff --git a/doze/res/values/strings.xml b/doze/res/values/strings.xml index 63146cb..fed5b05 100644 --- a/doze/res/values/strings.xml +++ b/doze/res/values/strings.xml @@ -13,8 +13,16 @@ --> + + On + + + Off + Ambient display Wake screen when you receive notifications + Screen will wake when you receive notifications + Screen will not wake when you receive notifications Tilt sensor @@ -31,5 +39,5 @@ OK Help - 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. + These features use sensor events to launch a doze notification pulse, this will cause higher battery usage. 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 @@ + + + + + + + + + + + + diff --git a/doze/res/xml/doze_settings.xml b/doze/res/xml/doze_settings.xml index dfa608b..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. --> - - - + + android:summary="@string/pick_up_summary" /> @@ -43,15 +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" /> + android:summary="@string/pocket_gesture_summary" /> -- cgit v1.2.3