Monitor user action on EditText

This example implement TextWatcher for EditText, such that we can detect user action on EditText, no extra “Enter” button is need. package com.blogspot.android_er.androidedittextchanged;import android.os.Bundle;import android.support.v7.app.AppCompatActivity;import android.text.Editable;import android.text.TextWatcher;import android.widget.EditText;import android.widget.TextView;public class MainActivity extends AppCompatActivity { EditText editText; TextView tvMsg, tvInfo; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); editText = (EditText)findViewById(R.id.edittext); tvMsg…

read more