Added remark about separating notifications

pull/203/head
M66B 3 years ago
parent a24784a12b
commit 82d7f0bb37

@ -19,12 +19,15 @@ package eu.faircode.email;
Copyright 2018-2021 by Marcel Bokhorst (M66B) Copyright 2018-2021 by Marcel Bokhorst (M66B)
*/ */
import static android.app.Activity.RESULT_OK;
import android.app.NotificationChannel; import android.app.NotificationChannel;
import android.app.NotificationManager; import android.app.NotificationManager;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.graphics.Paint;
import android.media.RingtoneManager; import android.media.RingtoneManager;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
@ -50,8 +53,6 @@ import androidx.constraintlayout.widget.Group;
import androidx.lifecycle.Lifecycle; import androidx.lifecycle.Lifecycle;
import androidx.preference.PreferenceManager; import androidx.preference.PreferenceManager;
import static android.app.Activity.RESULT_OK;
public class FragmentOptionsNotifications extends FragmentBase implements SharedPreferences.OnSharedPreferenceChangeListener { public class FragmentOptionsNotifications extends FragmentBase implements SharedPreferences.OnSharedPreferenceChangeListener {
private Button btnManage; private Button btnManage;
private Button btnManageDefault; private Button btnManageDefault;
@ -59,6 +60,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
private Button btnManageService; private Button btnManageService;
private ImageView ivChannelService; private ImageView ivChannelService;
private ImageButton ibWhy; private ImageButton ibWhy;
private FixedTextView tvNotifySeparate;
private SwitchCompat swNewestFirst; private SwitchCompat swNewestFirst;
private SwitchCompat swBackground; private SwitchCompat swBackground;
@ -136,6 +138,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
btnManageService = view.findViewById(R.id.btnManageService); btnManageService = view.findViewById(R.id.btnManageService);
ivChannelService = view.findViewById(R.id.ivChannelService); ivChannelService = view.findViewById(R.id.ivChannelService);
ibWhy = view.findViewById(R.id.ibWhy); ibWhy = view.findViewById(R.id.ibWhy);
tvNotifySeparate = view.findViewById(R.id.tvNotifySeparate);
swNewestFirst = view.findViewById(R.id.swNewestFirst); swNewestFirst = view.findViewById(R.id.swNewestFirst);
swBackground = view.findViewById(R.id.swBackground); swBackground = view.findViewById(R.id.swBackground);
@ -236,6 +239,14 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
} }
}); });
tvNotifySeparate.setPaintFlags(tvNotifySeparate.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
tvNotifySeparate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Helper.viewFAQ(view.getContext(), 145);
}
});
swNewestFirst.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { swNewestFirst.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {

@ -165,6 +165,20 @@
app:layout_constraintTop_toBottomOf="@+id/tvManageServiceHint" app:layout_constraintTop_toBottomOf="@+id/tvManageServiceHint"
app:srcCompat="@drawable/twotone_info_24" /> app:srcCompat="@drawable/twotone_info_24" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvNotifySeparate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:drawableEnd="@drawable/twotone_open_in_new_12"
android:drawablePadding="6dp"
android:drawableTint="?android:attr/textColorLink"
android:text="@string/title_advanced_notify_separate_hint"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorLink"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ibWhy" />
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/swNewestFirst" android:id="@+id/swNewestFirst"
android:layout_width="0dp" android:layout_width="0dp"
@ -173,7 +187,7 @@
android:text="@string/title_advanced_notifications_newest_first" android:text="@string/title_advanced_notifications_newest_first"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ibWhy" app:layout_constraintTop_toBottomOf="@id/tvNotifySeparate"
app:switchPadding="12dp" /> app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat

@ -704,6 +704,7 @@
<string name="title_advanced_notify_manage_hint">Tap on the channel name to set the channel properties</string> <string name="title_advanced_notify_manage_hint">Tap on the channel name to set the channel properties</string>
<string name="title_advanced_notify_manage_default_hint">To set the default sound, etc</string> <string name="title_advanced_notify_manage_default_hint">To set the default sound, etc</string>
<string name="title_advanced_notify_manage_service_hint">To disable the \'monitoring\' notification</string> <string name="title_advanced_notify_manage_service_hint">To disable the \'monitoring\' notification</string>
<string name="title_advanced_notify_separate_hint">How do I configure notifications for accounts, folders and senders?</string>
<string name="title_advanced_notify_preview_all_hint">For wearables that can show the full text (up to 5,000 characters)</string> <string name="title_advanced_notify_preview_all_hint">For wearables that can show the full text (up to 5,000 characters)</string>
<string name="title_advanced_notify_preview_only_hint">This delays showing of notifications until the message text has been downloaded</string> <string name="title_advanced_notify_preview_only_hint">This delays showing of notifications until the message text has been downloaded</string>
<string name="title_advanced_wearable_hint">Notifications are only sent to a wearable after the message text has been downloaded</string> <string name="title_advanced_wearable_hint">Notifications are only sent to a wearable after the message text has been downloaded</string>
@ -992,7 +993,7 @@
<string name="title_save_eml">Save raw message file</string> <string name="title_save_eml">Save raw message file</string>
<string name="title_eml_remark">To forward messages, the raw (original) messages need to be downloaded from the server. This requires an internet connection.</string> <string name="title_eml_remark">To forward messages, the raw (original) messages need to be downloaded from the server. This requires an internet connection.</string>
<string name="title_eml_option">This can prevented by enabling always downloading raw message files in the connection settings</string> <string name="title_eml_option">This can be prevented by enabling always downloading raw message files in the connection settings</string>
<string name="title_eml_downloaded">Raw messages downloaded: %1$s</string> <string name="title_eml_downloaded">Raw messages downloaded: %1$s</string>
<string name="title_buttons">Select buttons</string> <string name="title_buttons">Select buttons</string>

Loading…
Cancel
Save