I was wondering if there is a way to enforce a minimum value for the edit text preference.
Here's my node for the EditTextPreference in the preference screen xml file:
<EditTextPreference
android:id="@+id/txt_slideshow_speed"
android:key="@string/prefSlideShowSpeedKey"
android:persistent="true"
android:inputType="number"
android:max="3600"
android:dialogTitle="Slideshow Speed (seconds)"
android:defaultValue="@string/defaultSlideShowSpeedValue"
android:title="Slideshow Speed" />
First, you will need to get the EditText programmatically via getEditText(). Then, check out this link to set an input filter on your EditText.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With