-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(settings): dynamically generate notification settings
- Loading branch information
1 parent
96c1547
commit 470bdbe
Showing
4 changed files
with
149 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<!-- A 'parent' preference, which enables/disables child preferences (below) | ||
when checked/unchecked. --> | ||
<SwitchPreference | ||
android:defaultValue="true" | ||
android:key="notifications_new_message" | ||
android:title="@string/pref_title_new_message_notifications" | ||
android:summary="@string/pref_desc_new_message_notifications" | ||
/> | ||
|
||
<!-- Allows the user to choose a ringtone in the 'notification' category. --> | ||
<!-- NOTE: This preference will be enabled only when the checkbox above is checked. --> | ||
<!-- NOTE: RingtonePreference's summary should be set to its value by the activity code. --> | ||
<RingtonePreference | ||
android:defaultValue="content://settings/system/notification_sound" | ||
android:dependency="notifications_new_message" | ||
android:key="notifications_new_message_ringtone" | ||
android:ringtoneType="notification" | ||
android:title="@string/pref_title_ringtone" /> | ||
|
||
<!-- NOTE: This preference will be enabled only when the checkbox above is checked. --> | ||
<SwitchPreference | ||
android:defaultValue="true" | ||
android:dependency="notifications_new_message" | ||
android:key="notifications_new_message_vibrate" | ||
android:title="@string/pref_title_vibrate"/> | ||
<MultiSelectListPreference | ||
android:dependency="notifications_new_message" | ||
android:key="notifications_categories" | ||
android:title="@string/pref_title_notification_categories" | ||
android:summary="@string/pref_desc_notification_categories" | ||
android:entries="@array/pref_notification_categories" | ||
android:entryValues="@array/pref_notification_categories_values" | ||
android:defaultValue="@array/pref_notification_categories_default" | ||
/> | ||
<!-- This preference screen will be filled in via code --> | ||
</PreferenceScreen> |