title: Limit EditText to text (A-z) only
body: <p>I want an editText that <strong>only allows text input from A to z</strong>, no numbers or other characters. I've found out I have to use InputFilter but I don't understand how this code works.</p>
  
  <pre><code>InputFilter filter = new InputFilter() { 
      public CharSequence filter(CharSequence source, int start, int end, 
  Spanned dest, int dstart, int dend) { 
              for (int i = start; i &lt; end; i++) { 
                      if (!Character.isLetterOrDigit(source.charAt(i))) { 
                              return ""; 
                      } 
              } 
              return null; 
       } 
  }; 
  
  edit.setFilters(new InputFilter[]{filter}); 
  </code></pre>