From 7ee409ca7e1982ccc3e063b3faae5b34e85ea709 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 13 Mar 2022 21:41:07 +0100 Subject: [PATCH] Added link click ripple --- .../eu/faircode/email/AdapterMessage.java | 23 +++++++++++++++++-- app/src/main/res/drawable/ripple.xml | 3 +++ .../main/res/layout/include_message_body.xml | 8 +++++++ app/src/main/res/values/dimen.xml | 1 + 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 app/src/main/res/drawable/ripple.xml diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 094ea1cd1e..767e57a4e5 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -463,6 +463,7 @@ public class AdapterMessage extends RecyclerView.Adapter 0 && image[0].getSource() != null) { ImageHelper.AnnotatedSource a = new ImageHelper.AnnotatedSource(image[0].getSource()); Uri uri = Uri.parse(a.getSource()); - if ("http".equals(uri.getScheme()) || "https".equals(uri.getScheme())) + if ("http".equals(uri.getScheme()) || "https".equals(uri.getScheme())) { + ripple(event); if (onOpenLink(uri, null, false)) return true; + } } } @@ -602,6 +605,7 @@ public class AdapterMessage extends RecyclerView.Adapter + \ No newline at end of file diff --git a/app/src/main/res/layout/include_message_body.xml b/app/src/main/res/layout/include_message_body.xml index 40816cb4a1..cee91dd8f5 100644 --- a/app/src/main/res/layout/include_message_body.xml +++ b/app/src/main/res/layout/include_message_body.xml @@ -102,6 +102,14 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvDownloading" /> + + 3dp 3dp 48dp + 24dp \ No newline at end of file