3

I am looking for an elegant solution to block gif/emoji input from Gboard on Android. Since I use androidx.appcompat.widget.SearchView, there is no trivial way of leveraging onCreateInputConnection to create a custom AppCompatEditText. However I happened to find that Gboard doesn't show a gif button at all from Chrome's search view.

Is there an API or input type to achieve this? Note: voice search is enabled here.

enter image description here

Santanu Sur
  • 10,997
  • 7
  • 33
  • 52
Song
  • 504
  • 7
  • 17

1 Answers1

0

please use the below in your editText:

eyourEditText.setPrivateImeOptions("disableGifKeyboard=true;");

czane
  • 392
  • 1
  • 6
  • 18