From 673f7352130ba281cb1f02c5bcaaa4f9604cc426 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 15 May 2022 21:15:24 +0200 Subject: [PATCH] Replaced info buttons by info links --- .../java/eu/faircode/email/FragmentSetup.java | 14 ++++---- app/src/main/res/layout/fragment_setup.xml | 36 +++++++++++-------- app/src/main/res/values/strings.xml | 2 ++ 3 files changed, 31 insertions(+), 21 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentSetup.java b/app/src/main/java/eu/faircode/email/FragmentSetup.java index 4baec5d9ed..bc9825f2ec 100644 --- a/app/src/main/java/eu/faircode/email/FragmentSetup.java +++ b/app/src/main/java/eu/faircode/email/FragmentSetup.java @@ -100,13 +100,13 @@ public class FragmentSetup extends FragmentBase { private TextView tvPermissionsDone; private Button btnPermissions; - private ImageButton ibPermissions; + private TextView tvPermissionsWhy; private TextView tvImportContacts; private TextView tvDozeDone; private Button btnDoze; private TextView tvDoze12; - private ImageButton ibDoze; + private TextView tvDozeWhy; private Button btnBackgroundRestricted; private Button btnDataSaver; @@ -177,13 +177,13 @@ public class FragmentSetup extends FragmentBase { tvPermissionsDone = view.findViewById(R.id.tvPermissionsDone); btnPermissions = view.findViewById(R.id.btnPermissions); - ibPermissions = view.findViewById(R.id.ibPermissions); + tvPermissionsWhy = view.findViewById(R.id.tvPermissionsWhy); tvImportContacts = view.findViewById(R.id.tvImportContacts); tvDozeDone = view.findViewById(R.id.tvDozeDone); btnDoze = view.findViewById(R.id.btnDoze); tvDoze12 = view.findViewById(R.id.tvDoze12); - ibDoze = view.findViewById(R.id.ibDoze); + tvDozeWhy = view.findViewById(R.id.tvDozeWhy); btnBackgroundRestricted = view.findViewById(R.id.btnBackgroundRestricted); btnDataSaver = view.findViewById(R.id.btnDataSaver); @@ -492,7 +492,8 @@ public class FragmentSetup extends FragmentBase { } }); - ibPermissions.setOnClickListener(new View.OnClickListener() { + tvPermissionsWhy.setPaintFlags(tvPermissionsWhy.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); + tvPermissionsWhy.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Helper.viewFAQ(v.getContext(), 1); @@ -533,7 +534,8 @@ public class FragmentSetup extends FragmentBase { } }); - ibDoze.setOnClickListener(new View.OnClickListener() { + tvDozeWhy.setPaintFlags(tvDozeWhy.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); + tvDozeWhy.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Helper.viewFAQ(v.getContext(), 175, true); diff --git a/app/src/main/res/layout/fragment_setup.xml b/app/src/main/res/layout/fragment_setup.xml index fa07edc95c..b12fd0d1b2 100644 --- a/app/src/main/res/layout/fragment_setup.xml +++ b/app/src/main/res/layout/fragment_setup.xml @@ -612,16 +612,19 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@id/tvPermissions" /> - + app:layout_constraintTop_toBottomOf="@id/btnPermissions" /> + app:layout_constraintTop_toBottomOf="@id/tvPermissionsWhy" /> @@ -742,16 +745,19 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvDoze12" /> - + app:layout_constraintTop_toBottomOf="@id/tvDozeHint" /> + app:layout_constraintTop_toBottomOf="@id/tvDozeWhy" />