From 0284897ada0281e7f95f2593c1855f6a59f21e38 Mon Sep 17 00:00:00 2001 From: fyw Date: Mon, 5 Sep 2022 11:09:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../icspda/activity/INVTrans1Activity.java | 102 +++++++++--------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/app/src/main/java/com/icssoft/icspda/activity/INVTrans1Activity.java b/app/src/main/java/com/icssoft/icspda/activity/INVTrans1Activity.java index c706cab..29e0dc3 100644 --- a/app/src/main/java/com/icssoft/icspda/activity/INVTrans1Activity.java +++ b/app/src/main/java/com/icssoft/icspda/activity/INVTrans1Activity.java @@ -136,12 +136,12 @@ public class INVTrans1Activity extends AppCompatActivity { @Override public void run() { CheckStackCode(); -// if (IsFinish==true){ -// Looper.prepare(); -// barWithNumber.setProgress(100); -// dialog.dismiss(); -// IsFinish=false; -// } + if (IsFinish==true){ + Looper.prepare(); + barWithNumber.setProgress(100); + dialog.dismiss(); + IsFinish=false; + } } }).start(); @@ -172,12 +172,12 @@ public class INVTrans1Activity extends AppCompatActivity { @Override public void run() { CheckLotNoForTrans(); -// if (IsFinish==true){ -// Looper.prepare(); -// barWithNumber.setProgress(100); -// dialog.dismiss(); -// IsFinish=false; -// } + if (IsFinish==true){ + Looper.prepare(); + barWithNumber.setProgress(100); + dialog.dismiss(); + IsFinish=false; + } } }).start(); @@ -226,12 +226,12 @@ public class INVTrans1Activity extends AppCompatActivity { @Override public void run() { WareHouseTrans(); -// if (IsFinish==true){ -// Looper.prepare(); -// barWithNumber.setProgress(100); -// dialog.dismiss(); -// IsFinish=false; -// } + if (IsFinish==true){ + Looper.prepare(); + barWithNumber.setProgress(100); + dialog.dismiss(); + IsFinish=false; + } } }).start(); @@ -246,39 +246,39 @@ public class INVTrans1Activity extends AppCompatActivity { } private void JDT(){ -// barWithNumber = (HorizontalProgressBarWithNumber) findViewById(R.id.hpbwn); -// System.out.println(IsFinish); -// new Thread(new Runnable() { -// @Override -// public void run() { -// Looper.prepare(); -// showJDT(); -// Looper.loop(); -// Looper.getMainLooper().quit(); -// } -// }).start(); -// for (int i = 0; i <= 100; i++) { -// if (IsFinish==false){ -// try { -// Thread.sleep(50); -// barWithNumber.setProgress(i); -// } catch (InterruptedException e) { -// e.printStackTrace(); -// } -// }else { -// new Thread(new Runnable() { -// @Override -// public void run() { -// Looper.prepare(); -// barWithNumber.setProgress(100); -// dialog.dismiss(); -// IsFinish=false; -// -// } -// }).start(); -// break; -// } -// } + barWithNumber = (HorizontalProgressBarWithNumber) findViewById(R.id.hpbwn); + System.out.println(IsFinish); + new Thread(new Runnable() { + @Override + public void run() { + Looper.prepare(); + showJDT(); + Looper.loop(); + Looper.getMainLooper().quit(); + } + }).start(); + for (int i = 0; i <= 100; i++) { + if (IsFinish==false){ + try { + Thread.sleep(50); + barWithNumber.setProgress(i); + } catch (InterruptedException e) { + e.printStackTrace(); + } + }else { + new Thread(new Runnable() { + @Override + public void run() { + Looper.prepare(); + barWithNumber.setProgress(100); + dialog.dismiss(); + IsFinish=false; + + } + }).start(); + break; + } + } } private void showJDT() {