There’s no reason to use setRawInputType()
, just use setInputType()
. However, you have to combine the class and flags with the OR operator:
edit.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL | InputType.TYPE_NUMBER_FLAG_SIGNED);
More Related Contents:
- How do i start a new line in String? [duplicate]
- How to stop EditText from gaining focus when an activity starts in Android?
- Android soft keyboard covers EditText field
- Is there a way to define a min and max value for EditText in Android?
- How do I check if my EditText fields are empty? [closed]
- Android: show soft keyboard automatically when focus is on an EditText
- Android EditText delete(backspace) key event
- Soft keyboard open and close listener in an activity in Android
- Turn off autosuggest for EditText?
- How to create EditText with rounded corners?
- Android: Force EditText to remove focus? [duplicate]
- How do you set the EditText keyboard to only consist of numbers on Android?
- How to create EditText accepts Alphabets only in android?
- Prevent dialog dismissal on screen rotation in Android
- How can I know when an EditText loses focus?
- EditText error icon and show password missplaced
- EditText maxLines not working – user can still input more lines than set
- Live editing of users input
- How to replicate android:editable=”false” in code?
- Set unchangeable some part of editText android
- EditText with soft keyboard and “Back” button
- Android different EditText backgrounds for different states using shapes, selector or list
- Get Cursor Position in Android in Edit Text?
- EditText Settext not working with Fragment
- How to disable “Next” button on a EditText software keyboard (replace with “Done” button)
- How to clear an EditText on click?
- Android adjustpan not working after the first time
- How to change color of EditText handles?
- Android, how do I stop a pointer appearing below an EditText
- EditText request focus