Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android studio edittext enter pressed

EditText edittext = (EditText) findViewById(R.id.youredittext);
edittext.addTextChangedListener(new TextWatcher() {
  public void afterTextChanged(Editable s) { }
  public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
  public void onTextChanged(CharSequence s, int start, int before, int count) {
    if (s.toString().contains("
")) {
      //Action here
    }
  }
});
 
PREVIOUS NEXT
Tagged: #android #studio #edittext #enter #pressed
ADD COMMENT
Topic
Name
7+4 =