From f8136955b5d759a06834563005a5656216c6e603 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 1 Feb 2020 21:15:11 +0100 Subject: [PATCH] Added long press to show full attachment name --- .../eu/faircode/email/AdapterAttachment.java | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/AdapterAttachment.java b/app/src/main/java/eu/faircode/email/AdapterAttachment.java index e4d8897991..9e8482a00c 100644 --- a/app/src/main/java/eu/faircode/email/AdapterAttachment.java +++ b/app/src/main/java/eu/faircode/email/AdapterAttachment.java @@ -27,6 +27,8 @@ import android.content.pm.PackageManager; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; +import android.text.TextUtils; +import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -34,6 +36,7 @@ import android.widget.ImageButton; import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.TextView; +import android.widget.Toast; import androidx.annotation.NonNull; import androidx.core.content.FileProvider; @@ -66,7 +69,7 @@ public class AdapterAttachment extends RecyclerView.Adapter items = new ArrayList<>(); - public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { + public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnLongClickListener { private View view; private ImageButton ibDelete; private ImageView ivType; @@ -95,12 +98,14 @@ public class AdapterAttachment extends RecyclerView.Adapter