title: Specify the number of characters in edit text in android
body: <p>I have a small trick on how to restrict the number of characters in an <code>edit text</code> in android..for example I want to put a limit say 10 characters for the name field, so it will not allow the user to enter more than 10 characters.</p>
  
  <p>Also, I have another problem in specifying the <code>inputtype</code> for text, I know the procedure which is <code>android:inputType="text|textPersonName"</code> but it dosen't work since it allows the user to enter characters, numbers and also special characters.</p>
  
  <p>I will much appreciate your help.</p>
  
  <p>Thanks in advance</p>