0

Is it possible to show only 5 alphabets - "a","b","c","d","e" only rather then showing all the alphabets on android keyboard. I tried it by adding below property to edittext but it is not working still it is showing full keyboard.

android:inputType="textFilter"
android:digits="abcde"
Kapil Rajput
  • 11,429
  • 9
  • 50
  • 65
  • I think with your changes, the full keyboard will be shown but the user will only be able to select a, b, c, d, e – Astha Garg Aug 03 '22 at 11:24
  • @AsthaGarg Yes but Is it not possible to hide unused keys? – Kapil Rajput Aug 03 '22 at 11:25
  • Not possible . You have build your own custom keyboard .`android:digits` does not change anything on keyboard its just accept these digits that all its works like a filter. – ADM Aug 03 '22 at 11:28
  • 1
    You will need a custom keyboard (see [here](https://stackoverflow.com/a/44939816/6287910)) or an in-app keyboard (see same link.) You may be able to find a configurable keyboard in Google Play that can do what you want. – Cheticamp Aug 03 '22 at 11:28
  • 1
    @KapilRajput No, you can build your own Keyboard instead – Astha Garg Aug 03 '22 at 11:50
  • 1
    @AsthaGarg thanks for the quick response. Going to add the custom keyboard. – Kapil Rajput Aug 03 '22 at 11:54
  • @Cheticamp thanks for the quick response and link. Going to add the custom keyboard. – Kapil Rajput Aug 03 '22 at 11:55

1 Answers1

1

Yes but Is it not possible to hide unused keys?

No.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491