From d00df49087d8f29a6169338f69a90690aa233c75 Mon Sep 17 00:00:00 2001 From: wlt233 <1486185683@qq.com> Date: Tue, 18 Apr 2023 00:57:16 +0800 Subject: [PATCH] fix touch bug --- .../main/java/moe/tqlwsl/aicemu/MainActivity.kt | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/moe/tqlwsl/aicemu/MainActivity.kt b/app/src/main/java/moe/tqlwsl/aicemu/MainActivity.kt index a321e3a..57084c0 100644 --- a/app/src/main/java/moe/tqlwsl/aicemu/MainActivity.kt +++ b/app/src/main/java/moe/tqlwsl/aicemu/MainActivity.kt @@ -99,10 +99,6 @@ class MainActivity : AppCompatActivity() { if (nfcPendingIntent != null) { nfcAdapter?.enableForegroundDispatch(this, nfcPendingIntent, null, null) } -// val orgSys = nfcFCardEmulation?.getSystemCodeForService(nfcFComponentName) -// if (orgSys != null) { -// setSys(orgSys) -// } nfcFCardEmulation?.enableService(this, nfcFComponentName) } @@ -177,11 +173,11 @@ class MainActivity : AppCompatActivity() { saveCards() } } - cardView.setOnTouchListener { v, _ -> - editText.clearFocus() - v.performClick() - true - } +// cardView.setOnTouchListener { v, _ -> +// editText.clearFocus() +// v.performClick() +// true +// } true } R.id.card_menu_delete -> { @@ -249,6 +245,8 @@ class MainActivity : AppCompatActivity() { showCardMenu(it, cardView) } cardView.setOnTouchListener { v, _ -> + val editText = v.findViewById(R.id.card_name_edit) + editText.clearFocus() emuCard(v) v.performClick() true