HeadsUp: Stop showing notifications when selected applications on top [2/2]
Thanks to Decad3nce for idea and code And credits to old CM's team Change-Id: Icc9edc05df695dfe2bb77ea7a6d71d06a5215bee Signed-off-by: Shubham Singh <coolsks94@gmail.com> Signed-off-by: Arghya Chanda <arghyac35@gmail.com> Signed-off-by: SagarMakhar <sagarmakhar@gmail.com> Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
@@ -188,4 +188,17 @@
|
||||
<string name="toast_icon_title">Toast app icon</string>
|
||||
<string name="toast_icon_summary">Display the app\'s icon corresponding with the toast</string>
|
||||
|
||||
<!-- Heads up -->
|
||||
<string name="headsup_category">HeadsUp Settings</string>
|
||||
<string name="heads_up_notifications">Heads up</string>
|
||||
<string name="heads_up_notifications_summary">Customise heads up notifications settings</string>
|
||||
<string name="summary_heads_up_enabled">Pop-up notifications are enabled</string>
|
||||
<string name="summary_heads_up_disabled">Pop-up notifications are disabled</string>
|
||||
<string name="add_heads_up_package">Add app</string>
|
||||
<string name="add_heads_up_stoplist_summary">Disable heads up notifications in these applications</string>
|
||||
<string name="heads_up_stoplist_title">Applist</string>
|
||||
<string name="profile_choose_app">Choose app</string>
|
||||
<string name="dialog_delete_title">Delete</string>
|
||||
<string name="dialog_delete_message">Remove selected item?</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -42,6 +42,18 @@
|
||||
|
||||
</PreferenceCategory> -->
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="headsup_notifications_category"
|
||||
android:title="@string/headsup_category">
|
||||
|
||||
<Preference
|
||||
android:key="heads_up_notifications"
|
||||
android:summary="@string/heads_up_notifications_summary"
|
||||
android:title="@string/heads_up_notifications"
|
||||
android:fragment="com.cherish.settings.fragments.HeadsUpSettings"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="toast_icon"
|
||||
android:title="@string/toast_icon_title"
|
||||
|
||||
36
res/xml/heads_up_settings.xml
Normal file
36
res/xml/heads_up_settings.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2014 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.
|
||||
-->
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<com.cherish.settings.preferences.GlobalSettingSwitchPreference
|
||||
android:key="heads_up_notifications_enabled"
|
||||
android:title="@string/heads_up_notifications"
|
||||
android:summaryOn="@string/summary_heads_up_enabled"
|
||||
android:summaryOff="@string/summary_heads_up_disabled"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/heads_up_stoplist_title"
|
||||
android:key="stoplist_applications"
|
||||
android:dependency="heads_up_notifications_enabled" >
|
||||
<Preference
|
||||
android:key="add_stoplist_packages"
|
||||
android:icon="@drawable/ic_menu_add"
|
||||
android:title="@string/add_heads_up_package"
|
||||
android:summary="@string/add_heads_up_stoplist_summary" />
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
Reference in New Issue
Block a user