An EditTextPreference with Minimum character requirement
问题 I have an EditTextPreference that I user to allow use to set a passcode to an app. I want to require a 4-digit passcode. I set the maxLength = "4" in the xml file. Now I have the problem to not allow submit unless the entered passcode is 4 digits long. Here is what I have: <EditTextPreference android:defaultValue="" android:dependency="EnablePasscode" android:dialogMessage="Add a numeric passcode to provide access to enter the app. The passcode must be 4 digits." android:dialogTitle="Set