I set the max length of EditText
by writing the following in XML file
android:maxLength="16"
I want to get this length programmatically (inside TextWatcher
).
I got one answer using How to Get EditText maxLength setting in code link, however, it is not what I want because it does not work when the maxLength is changed in runtime.
How can I get the length of EditText programmatically? (MinSDKVersion is 14)