From 30e52d550a6e52d034cbaf1b6d6506207ff76d10 Mon Sep 17 00:00:00 2001 From: FoxV Date: Thu, 22 Sep 2022 16:55:33 +0800 Subject: [PATCH] 1 --- .../icspda/activity/INVTransActivity.java | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/icssoft/icspda/activity/INVTransActivity.java b/app/src/main/java/com/icssoft/icspda/activity/INVTransActivity.java index c155414..f0aa58a 100644 --- a/app/src/main/java/com/icssoft/icspda/activity/INVTransActivity.java +++ b/app/src/main/java/com/icssoft/icspda/activity/INVTransActivity.java @@ -6,7 +6,9 @@ import android.os.Handler; import android.os.Looper; import android.os.Message; import android.os.SystemClock; +import android.text.Editable; import android.text.TextUtils; +import android.text.TextWatcher; import android.util.Log; import android.view.KeyEvent; import android.view.View; @@ -180,7 +182,7 @@ public class INVTransActivity extends AppCompatActivity { btnOk = findViewById(R.id.btn_ok); rbIn = findViewById(R.id.rbIn); rbOut = findViewById(R.id.rbOut); -// HelpUtil.disableShowSoftInput(transferNo); + HelpUtil.disableShowSoftInput(etTransCode); // HelpUtil.disableShowSoftInput(toBin); // HelpUtil.disableShowSoftInput(barCode); dataList = new ArrayList<>(); @@ -224,6 +226,29 @@ public class INVTransActivity extends AppCompatActivity { } return false; } }); + etTransCode.addTextChangedListener(new TextWatcher() { + @Override + public void beforeTextChanged(CharSequence s, int start, int count, int after) { + + } + + @Override + public void onTextChanged(CharSequence s, int start, int before, int count) { + + } + + @Override + public void afterTextChanged(Editable s) { + if (s != null && s.toString().length() != 0){ + new Thread(new Runnable() { + @Override + public void run() { + CheckTransferNo(); + } + }).start(); + } + } + }); //目标库位 toBin.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override