From 4afb23bbb48d71beab801b21d05275e915722ae5 Mon Sep 17 00:00:00 2001 From: Gigahawk Date: Sun, 23 Feb 2020 18:07:29 -0800 Subject: Add longpress to copy implicit username (#635) * Add longpress to copy implicit username * Address review comments Signed-off-by: Harsh Shandilya Co-authored-by: Harsh Shandilya --- app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/src/main') diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt index 7acb22d4..4e49dfe3 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt @@ -124,6 +124,12 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound { setContentView(R.layout.decrypt_layout) crypto_password_category_decrypt.text = relativeParentPath crypto_password_file.text = name + crypto_password_file.setOnLongClickListener { + val clip = ClipData.newPlainText("pgp_handler_result_pm", name) + clipboard.setPrimaryClip(clip) + showSnackbar(this.resources.getString(R.string.clipboard_username_toast_text)) + true + } crypto_password_last_changed.text = try { this.resources.getString(R.string.last_changed, lastChangedString) -- cgit v1.2.3