From 69a2c5b8fbb542dc767f01a1afa4908ecaeba386 Mon Sep 17 00:00:00 2001 From: Daniel Weigl Date: Thu, 28 Dec 2017 15:56:59 +0100 Subject: [PATCH] for copy/paste, use the unformatted representation --- .../org/shadowice/flocke/andotp/View/EntryViewHolder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/shadowice/flocke/andotp/View/EntryViewHolder.java b/app/src/main/java/org/shadowice/flocke/andotp/View/EntryViewHolder.java index d6f26f6c..318715d8 100644 --- a/app/src/main/java/org/shadowice/flocke/andotp/View/EntryViewHolder.java +++ b/app/src/main/java/org/shadowice/flocke/andotp/View/EntryViewHolder.java @@ -101,7 +101,7 @@ public class EntryViewHolder extends RecyclerView.ViewHolder @Override public void onClick(View view) { if (callback != null) - callback.onCopyButtonClicked(value.getText().toString(), getAdapterPosition()); + callback.onCopyButtonClicked(value.getTag().toString(), getAdapterPosition()); } }); @@ -115,6 +115,8 @@ public class EntryViewHolder extends RecyclerView.ViewHolder this.label.setText(label); value.setText(tokenFormatted); + // save the unformatted token to the tag of this TextView for copy/paste + value.setTag(token); StringBuilder stringBuilder = new StringBuilder(); for(int i = 0; i < tags.size(); i++) {