This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • 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
Saloon Keeper
Posts: 18362
56
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