I have a set of values defined in preference.xml:
<EditTextPreference
android:defaultValue="19999999999"
android:key="@string/phone_number"
android:persistent="true"
android:summary="Test Number"
android:title="Phone" />
For some reasons, the OS thinks “19999999999” is an integer(int type) and caps it to 2^31. So I end up seeing something like: 672647167
19999999999 : 10010101000000101111100011111111111
Removing the first four binary numbers, I get the following that matches with what Android OS shows.
672647167 : 101000000101111100011111111111
Is there a workaround?
Try using something like
android:hint="@string/PhoneNumberDefault"and put your phone number in the strings resource. Should have the desired effect.