From dc515674c5ca57d4e0cf37b5860b6ee4f4ec4980 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 1 Oct 2021 17:46:58 +0200 Subject: [PATCH] Added Android Auto info button --- .../email/FragmentOptionsNotifications.java | 9 ++++++++ .../twotone_directions_car_filled_24.xml | 21 +++++++++++++++++++ .../layout/fragment_options_notifications.xml | 12 ++++++++++- 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 app/src/main/res/drawable/twotone_directions_car_filled_24.xml diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsNotifications.java b/app/src/main/java/eu/faircode/email/FragmentOptionsNotifications.java index 426e504533..36d4f52979 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsNotifications.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsNotifications.java @@ -98,6 +98,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared private SwitchCompat swWearablePreview; private ImageButton ibWearable; private SwitchCompat swMessagingStyle; + private ImageButton ibCar; private SwitchCompat swBiometricsNotify; private SwitchCompat swAlertOnce; private TextView tvNoGrouping; @@ -176,6 +177,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared swWearablePreview = view.findViewById(R.id.swWearablePreview); ibWearable = view.findViewById(R.id.ibWearable); swMessagingStyle = view.findViewById(R.id.swMessagingStyle); + ibCar = view.findViewById(R.id.ibCar); swBiometricsNotify = view.findViewById(R.id.swBiometricsNotify); swAlertOnce = view.findViewById(R.id.swAlertOnce); tvNoGrouping = view.findViewById(R.id.tvNoGrouping); @@ -496,6 +498,13 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared } }); + ibCar.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Helper.viewFAQ(v.getContext(), 165); + } + }); + swBiometricsNotify.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { diff --git a/app/src/main/res/drawable/twotone_directions_car_filled_24.xml b/app/src/main/res/drawable/twotone_directions_car_filled_24.xml new file mode 100644 index 0000000000..649171097d --- /dev/null +++ b/app/src/main/res/drawable/twotone_directions_car_filled_24.xml @@ -0,0 +1,21 @@ + + + + + + diff --git a/app/src/main/res/layout/fragment_options_notifications.xml b/app/src/main/res/layout/fragment_options_notifications.xml index 332f4e8b19..c93a901005 100644 --- a/app/src/main/res/layout/fragment_options_notifications.xml +++ b/app/src/main/res/layout/fragment_options_notifications.xml @@ -742,6 +742,16 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/swMessagingStyle" /> + +