簡體   English   中英

有沒有辦法在藍牙條碼掃描儀輸入之前清除編輯文本

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

我有一個Edittext ,我想在接收條形碼掃描儀下一次掃描的輸入之前清除它。 問題是每次我掃描條形碼時,輸入都會添加到上次掃描的結果中,如下所示:

id=3id=12id=34

我嘗試了beforeTextChanged事件,但它對我不起作用!

這個簡單的代碼可以清除editext,你試過嗎?

editText.getText().clear();

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM