|
|
@ -9,7 +9,9 @@ import android.os.Message; |
|
|
|
import android.text.Editable; |
|
|
|
import android.text.TextUtils; |
|
|
|
import android.text.TextWatcher; |
|
|
|
import android.view.KeyEvent; |
|
|
|
import android.view.View; |
|
|
|
import android.view.inputmethod.EditorInfo; |
|
|
|
import android.widget.Button; |
|
|
|
import android.widget.EditText; |
|
|
|
import android.widget.RadioButton; |
|
|
@ -104,20 +106,13 @@ public class POStockINActivity extends AppCompatActivity { |
|
|
|
HelpUtil.disableShowSoftInput(stackNo); |
|
|
|
HelpUtil.disableShowSoftInput(barCode); |
|
|
|
dataList = new ArrayList<>(); |
|
|
|
stackNo.addTextChangedListener(new TextWatcher() { |
|
|
|
@Override |
|
|
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
stackNo.setOnEditorActionListener(new TextView.OnEditorActionListener() { |
|
|
|
@Override |
|
|
|
public void onTextChanged(CharSequence s, int start, int before, int count) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void afterTextChanged(Editable s) { |
|
|
|
if (s.toString().length() > 0) { |
|
|
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { |
|
|
|
if (actionId == EditorInfo.IME_ACTION_SEND || actionId == EditorInfo.IME_ACTION_DONE |
|
|
|
|| (event != null && KeyEvent.KEYCODE_ENTER == event.getKeyCode() && KeyEvent.ACTION_DOWN == event.getAction())) { |
|
|
|
if (v.getText().length() > 0) { |
|
|
|
new Thread(new Runnable() { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
@ -126,22 +121,38 @@ public class POStockINActivity extends AppCompatActivity { |
|
|
|
}).start(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
barCode.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) { |
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
// stackNo.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.toString().length() > 0) { |
|
|
|
// new Thread(new Runnable() { |
|
|
|
// @Override |
|
|
|
// public void run() { |
|
|
|
// CheckStackCode(); |
|
|
|
// } |
|
|
|
// }).start(); |
|
|
|
// } |
|
|
|
// } |
|
|
|
// }); |
|
|
|
barCode.setOnEditorActionListener(new TextView.OnEditorActionListener() { |
|
|
|
@Override |
|
|
|
public void afterTextChanged(Editable s) { |
|
|
|
if (s.toString().length() > 0) { |
|
|
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { |
|
|
|
if (actionId == EditorInfo.IME_ACTION_SEND || actionId == EditorInfo.IME_ACTION_DONE |
|
|
|
|| (event != null && KeyEvent.KEYCODE_ENTER == event.getKeyCode() && KeyEvent.ACTION_DOWN == event.getAction())) { |
|
|
|
if (v.getText().length() > 0) { |
|
|
|
new Thread(new Runnable() { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
@ -150,7 +161,32 @@ public class POStockINActivity extends AppCompatActivity { |
|
|
|
}).start(); |
|
|
|
} |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
|
// barCode.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.toString().length() > 0) { |
|
|
|
// new Thread(new Runnable() { |
|
|
|
// @Override |
|
|
|
// public void run() { |
|
|
|
// CheckLotNoForStockIn(); |
|
|
|
// } |
|
|
|
// }).start(); |
|
|
|
// } |
|
|
|
// } |
|
|
|
// }); |
|
|
|
|
|
|
|
btnDel.setOnClickListener(new View.OnClickListener() { |
|
|
|
@Override |
|
|
|