Added badge info button

This commit is contained in:
M66B 2021-02-26 15:00:26 +01:00
parent fc7b243746
commit f572954419
2 changed files with 20 additions and 1 deletions

View File

@ -77,6 +77,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
private Button btnSound;
private SwitchCompat swBadge;
private ImageButton ibBadge;
private SwitchCompat swUnseenIgnored;
private SwitchCompat swNotifyBackgroundOnly;
private SwitchCompat swNotifyKnownOnly;
@ -147,6 +148,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
btnSound = view.findViewById(R.id.btnSound);
swBadge = view.findViewById(R.id.swBadge);
ibBadge = view.findViewById(R.id.ibBadge);
swUnseenIgnored = view.findViewById(R.id.swUnseenIgnored);
swNotifyBackgroundOnly = view.findViewById(R.id.swNotifyBackgroundOnly);
swNotifyKnownOnly = view.findViewById(R.id.swNotifyKnownOnly);
@ -335,6 +337,13 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
}
});
ibBadge.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Helper.viewFAQ(v.getContext(), 106);
}
});
swUnseenIgnored.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {

View File

@ -363,6 +363,16 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swBadge" />
<ImageButton
android:id="@+id/ibBadge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/title_info"
android:tooltipText="@string/title_info"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvBadgeHint"
app:srcCompat="@drawable/twotone_info_24" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swUnseenIgnored"
android:layout_width="0dp"
@ -371,7 +381,7 @@
android:text="@string/title_advanced_unseen_ignored"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvBadgeHint"
app:layout_constraintTop_toBottomOf="@id/ibBadge"
app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat