How to search and Highlight Text within an EditText

送分小仙女□ 提交于 2019-12-08 18:46:33
  1. grab the text from the (EditText) assign it to a string

Try the code sample below:

EditText inputUsername = (EditText) findViewById(R.id.manageAccountInputUsername);
inputUsername.getText().toString()

^^ Replace the IDs with the IDs you are using.

After this, you have the standard string methods available. You could also use Regex for a complex search query:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!