commit
e48bf683f7
@ -0,0 +1,16 @@ |
|||||||
|
package com.keylesspalace.tusky; |
||||||
|
|
||||||
|
import android.content.BroadcastReceiver; |
||||||
|
import android.content.Context; |
||||||
|
import android.content.Intent; |
||||||
|
import android.content.SharedPreferences; |
||||||
|
|
||||||
|
public class NotificationClearBroadcastReceiver extends BroadcastReceiver { |
||||||
|
@Override |
||||||
|
public void onReceive(Context context, Intent intent) { |
||||||
|
SharedPreferences notificationPreferences = context.getSharedPreferences("Notifications", Context.MODE_PRIVATE); |
||||||
|
SharedPreferences.Editor editor = notificationPreferences.edit(); |
||||||
|
editor.putString("current", "[]"); |
||||||
|
editor.apply(); |
||||||
|
} |
||||||
|
} |
@ -1,6 +1,8 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"> |
<menu xmlns:android="http://schemas.android.com/apk/res/android"> |
||||||
|
<item |
||||||
|
android:id="@+id/status_share" |
||||||
|
android:title="@string/action_share"/> |
||||||
<item android:title="@string/action_delete" |
<item android:title="@string/action_delete" |
||||||
android:id="@+id/status_delete" /> |
android:id="@+id/status_delete" /> |
||||||
</menu> |
</menu> |
@ -1,23 +1,28 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" |
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
android:key="@string/preferences_file_key"> |
android:key="@string/preferences_file_key"> |
||||||
|
|
||||||
<PreferenceCategory android:title="@string/pref_title_notification_settings"> |
<PreferenceCategory android:title="@string/pref_title_notification_settings"> |
||||||
<CheckBoxPreference |
<CheckBoxPreference |
||||||
|
android:key="notificationsEnabled" |
||||||
|
android:title="@string/pref_title_notifications_enabled" |
||||||
|
android:defaultValue="true" /> |
||||||
|
|
||||||
|
<CheckBoxPreference |
||||||
|
android:dependency="notificationsEnabled" |
||||||
android:key="notificationAlertSound" |
android:key="notificationAlertSound" |
||||||
android:title="@string/pref_title_notification_alert_sound" |
android:title="@string/pref_title_notification_alert_sound" |
||||||
android:defaultValue="true" /> |
android:defaultValue="true" /> |
||||||
|
|
||||||
<CheckBoxPreference |
<CheckBoxPreference |
||||||
|
android:dependency="notificationsEnabled" |
||||||
android:key="notificationStyleVibrate" |
android:key="notificationStyleVibrate" |
||||||
android:title="@string/pref_title_notification_style_vibrate" |
android:title="@string/pref_title_notification_style_vibrate" |
||||||
android:defaultValue="true" /> |
android:defaultValue="true" /> |
||||||
|
|
||||||
<CheckBoxPreference |
<CheckBoxPreference |
||||||
|
android:dependency="notificationsEnabled" |
||||||
android:key="notificationStyleLight" |
android:key="notificationStyleLight" |
||||||
android:title="@string/pref_title_notification_style_light" |
android:title="@string/pref_title_notification_style_light" |
||||||
android:defaultValue="true" /> |
android:defaultValue="true" /> |
||||||
|
|
||||||
</PreferenceCategory> |
</PreferenceCategory> |
||||||
|
|
||||||
</PreferenceScreen> |
</PreferenceScreen> |
||||||
|
Loading…
Reference in new issue