What is the best way to set up a widget in Android to enter a four-digit PIN?
I currently have:
<EditTextPreference
android:title="PIN"
android:summary="Your PIN number"
android:key="password"
android:numeric="integer"
android:maxLength="4"
android:password="true"
/>
This works very well, but there is no way to limit the input to at least 4 digits. Is it so if someone set a PIN in the settings? Or is there a better way?
By the way, before people comment on the security implications, I did not select a 4-digit PIN code, it is designed to connect to a third-party system, and I cannot change it. And no, this is not for banking.
source
share