I'm trying to set a max length of 2 in an EditText so that users cannot type in more than 2 characters for abbreviations. But when running the code, I can still type in any amount of characters I want. Is there something wrong with the way I implemented maxLength?
<EditText
android:id="@+id/register_edit_stcn"
android:maxLength="2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:background="#00000000"
android:capitalize="sentences"
android:gravity="left"
android:hint="ST OR CN"
android:inputType="text"
android:letterSpacing="0.095"
android:textAllCaps="true"
android:textColor="#FFF"
android:textSize="16dp" />