简体   繁体   中英

Is there a way to clear edittext before bluetooth barcode scanner input

I have an Edittext and I want to clear it before receiving the input from the next scan by barcode scanner. The problem is that every time I scan a barcode, the input is added to the result of previous scan like this:

id=3id=12id=34

I tried beforeTextChanged event and it doesn't work for me!

这个简单的代码可以清除editext,你试过吗?

editText.getText().clear();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM