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() {