I want to get the text into some String in my app while the user is typing in the EditText and use it to lively show it on the activity (in different View...) - Just like google's live/instant search works...
You are looking for TextWatcher
:
youredittext.addTextChangedListener(new TextWatcher()
{
@Override
public void afterTextChanged(Editable mEdit)
{
text = mEdit.toString();
}
public void beforeTextChanged(CharSequence s, int start, int count, int after){}
public void onTextChanged(CharSequence s, int start, int before, int count){}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With