From 32b2ed08c0643672013d5f53f424fc96d7a9634c Mon Sep 17 00:00:00 2001 From: Lars Greiss Date: Thu, 3 Nov 2016 15:02:19 +0800 Subject: [PATCH] HeadsUp: add timeout option (2/2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Forward ported to marshmallow/nougat By: @BeansTown106 removed the none option as we now have a headsup minimum time of 2seconds added 5sec option as that is the new default in marshmallow Signed-off-by: Arghya Chanda Change-Id: I6af7fef23f1cdb62390bd4bf8b81b5ca9bdb2a8d Signed-off-by: SagarMakhar Signed-off-by: Hưng Phan --- res/values/cherish_arrays.xml | 18 ++++++++ res/values/cherish_strings.xml | 10 +++++ res/xml/heads_up_settings.xml | 7 ++++ .../settings/fragments/HeadsUpSettings.java | 41 ++++++++++++++++++- 4 files changed, 75 insertions(+), 1 deletion(-) diff --git a/res/values/cherish_arrays.xml b/res/values/cherish_arrays.xml index 54d9e26..d1883ef 100644 --- a/res/values/cherish_arrays.xml +++ b/res/values/cherish_arrays.xml @@ -24,4 +24,22 @@ 1 2 + + + + @string/heads_up_time_out_2sec + @string/heads_up_time_out_4sec + @string/heads_up_time_out_5sec + @string/heads_up_time_out_6sec + @string/heads_up_time_out_8sec + @string/heads_up_time_out_10sec + + + 2000 + 4000 + 5000 + 6000 + 8000 + 10000 + diff --git a/res/values/cherish_strings.xml b/res/values/cherish_strings.xml index 3ed727f..01d41f6 100644 --- a/res/values/cherish_strings.xml +++ b/res/values/cherish_strings.xml @@ -203,4 +203,14 @@ Delete Remove selected item? + + Time out + Peeking notifications will show for %d seconds + 2 seconds + 4 seconds + 5 seconds + 6 seconds + 8 seconds + 10 seconds + diff --git a/res/xml/heads_up_settings.xml b/res/xml/heads_up_settings.xml index 5d6a1ce..bfc1602 100644 --- a/res/xml/heads_up_settings.xml +++ b/res/xml/heads_up_settings.xml @@ -22,6 +22,13 @@ android:summaryOff="@string/summary_heads_up_disabled" android:defaultValue="true" /> + +