title: How to set maxlength for edit text programmatically?
body: <p>In my application i have listed card names in spinner and created an edit text to get input from the user. If i enter CVV number in edit text it has to set its length according to the card name (i.e) if i select master card from spinner the edit text has to get only 3 digits from user and if i enter American express the  edit text has to get only 4 digits from user. I don't know how to set maximum length for edit text i have tried using Input Filter but its not working as per the condition. Please help me to proceed further. </p>