• Post Reply Bookmark Topic Watch Topic
  • New Topic

setting custom input type

 
Muhammad Imad Qureshi
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to have a custom input type for "EditText"? I want to allow numeric and also "% sign" and "/" and "*" but nothing else. If I set input type to "numberDecimal" then it does not allow other signs. How can I get those?

Thanks
Imad
 
Tim Holloway
Bartender
Posts: 18412
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's an option for that and I think it's called "digits". You list the allowable input characters, and I think it will give you what you want.
 
Piyush Patel
Ranch Hand
Posts: 127
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I set input type to "numberDecimal" then it does not allow other signs. How can I get those?


setInputType as InputType.TYPE_CLASS_NUMBER , this will not allow user to entre *,# etc characters.. it will allow ONLY DIGITS.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!