From a0982360ec6fa4c0936c7f1879a1fd09b35c02cc Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Wed, 28 Aug 2024 17:53:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BA=86=E7=82=B9=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Adapters/PassWordListAdapter.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/yutou/passmanage/Adapters/PassWordListAdapter.java b/app/src/main/java/com/yutou/passmanage/Adapters/PassWordListAdapter.java index bc76a03..b4fce46 100644 --- a/app/src/main/java/com/yutou/passmanage/Adapters/PassWordListAdapter.java +++ b/app/src/main/java/com/yutou/passmanage/Adapters/PassWordListAdapter.java @@ -69,10 +69,21 @@ public class PassWordListAdapter extends RecyclerView.Adapter() { + @Override + public void onResponse(int code, String status, String response) { + ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE); + ClipData clip = ClipData.newPlainText("", response); + clipboard.setPrimaryClip(clip); + Toast.makeText(context, ResTools.getString(context, R.string.toast_copy_password), Toast.LENGTH_LONG).show(); + } + + @Override + public void onFailure(Throwable throwable) { + + } + }); + } }); holder.item_layout.setOnClickListener(new View.OnClickListener() {