android:digits Problem
- by user244190
I am using the following xml to limit input to digits only in an EditText widget. The android:digits attribute uses the below array resource. Everything works great except for the fact that I can't enter the number 4 even though its in the array. Any Ideas?
<EditText
android:id="@+id/mynumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="40dp"
android:textStyle="bold"
android:gravity="center_horizontal"
android:layout_centerHorizontal="true"
android:textColor="#aaffaa"
android:numeric="integer"
android:digits="@array/digits"
android:background="#00000000"
android:inputType="phone"
android:focusable="true"
android:singleLine="true"
/>
<string-array name="digits">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
</string-array>
Thanks