Reputation: 11
I am making a math program that reads in numbers from an edittext box, and creates / LU factors a matrix. When a user clicks into this field, the regular keyboard shows. It would be easier for the user if it were a numeric keyboard. When I use android:inputStyle="number" the amount of numbers allowed to be entered into the field is 1. How do I bring up the numeric keyboard without limiting the ability to enter multiple numbers?
Upvotes: 1
Views: 4718
Reputation: 421
android:numeric has been depreciated. (From Google: android:numeric If set, specifies that this TextView has a numeric input method. * Deprecated: Use inputType instead.)
android:inputType="number" seems to work great for me. There are a lot of options as well. (From Google: The type of data being placed in a text field, used to help an input method decide how to let the user enter text.)
Upvotes: 2
Reputation: 2109
Add this in each numeric edittext in your layout file:
android:numeric="decimal"
Upvotes: 3