final TextView textMsg = (TextView) findViewById(R.id.textviewTicketNo);
TextWatcher textWatcher = new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
textMsg.setText("Processing...");
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable) {
// get text value from textbox (txtScanningInfo)
// start processing when detect certain char ('\n')
}
};
txtScanningInfo.addTextChangedListener(textWatcher);