title: android EditText maxLength not working
body: <p>This is my xml</p>
  <pre><code>&lt;EditText
  android:id=&quot;@+id/et_comment&quot;
  android:layout_width=&quot;match_parent&quot;
  android:layout_height=&quot;wrap_content&quot;
  android:inputType=&quot;textNoSuggestions|textVisiblePassword&quot;
  android:hint=&quot;Provide comments here...&quot;
  android:gravity=&quot;top&quot;
  android:maxLength=&quot;5&quot;
  android:textSize=&quot;12sp&quot;
  android:visibility=&quot;visible&quot;
  /&gt;
  </code></pre>
  <p>Neither is it working using this code</p>
  <pre><code>TextView editEntryView = new TextView(...);
  InputFilter[] filterArray = new InputFilter[1];
  filterArray[0] = new InputFilter.LengthFilter(5);
  editEntryView.setFilters(filterArray);
  </code></pre>
  <p>maxLenth is not working, I dont know why, but it isnt.<br />
  I have checked other answers on the stack but they are also not working.<br />
  Please check if any of EditText attributes are conflicting or what is the problem?</p>
  <p><strong>EDIT: Same problem is being faced by other developers</strong><br />
  See comments <a href="https://stackoverflow.com/a/12083367/3828908">here</a> same problem is being faced by Mansi and aat<br />
  And <a href="https://stackoverflow.com/questions/3285412/limit-text-length-of-edittext-in-android">here</a> in comments same problem is being faced by Vincy and Riser</p>
  <p><strong>EDIT: Problem solved</strong><br />
  I was using input filter which overrides the max length in xml making it not able to work.<br />
  The reason input filter didn't worked for me was that I was using another input filter which overwrites the previous maxLength input filter.<br />
  Making it into a single input filter fixed that issue for me.</p>