How does Chrome hide "GIF" button from Gboard on its search view? - android

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.

please use the below in your editText:
eyourEditText.setPrivateImeOptions("disableGifKeyboard=true;");

Related

How do I add search functionality in custom keyboard?

I am creating a custom keyboard for android. And I want to add search functionality in it.
How do I implement it in keyboard, like the GBoard ?
If this question is a hoax, please let me know.

Android: Pull out emoji keyboard on button press

I know that you can specify a short message input type in order to turn the enter key of the keyboard into an emoji button and pressing it will show up the emoji list but what i want to do is open up the emoji list programatically from a button. Is this possible?
There is no functionality to add tabs to any generic keyboard. Certain keyboards may support it, but it isn't a common feature. You could write your own fully custom keyboard, but that's a lot of work and will piss off many users.
Also, I'm not sure what you mean about by like in hangouts. I use hangouts- it doesn't do anything odd with my keyboard. It stays as Swype, there's no special emoji tab. It may be a feature of your favorite keyboard based on the input type (I assume both use input type textShortMessage). But it isn't a generic feature.
See Link Android Keyboard with Emoji
Thanks and enjoy...

Use custom color to highlight searched text in webview

After a lot of searching for documentation on how this can be done I am finally posting this on SO.
Currently in my app I have implemented a search feature to search text in webview. I am using the inbuilt webview methods to search and highlight all text entries, of the text searched by the user, in the webview.
I now want to change the default highlight color to my own custom color and not use the default implementation. I have been trying to look over everywhere for this but I did not see any specific way of how this can be done.
Can someone please give some hints/suggestions on how this can be done. Very thankful if you stopby and put some of your thoughts.
Does this do the trick for you:
http://danbarnett.net/how-to-hide-android-webview-highlight-border-or-change-its-color-142.html
From the sounds of it you can't actually change the default but you can work around it, or over-ride it using jquery and some css..
And some more Google results of interest:
http://www.icab.de/blog/2010/01/12/search-and-highlight-text-in-uiwebview/
And an overflow question with good answer:
Android webview: highlight a specific word in a page using javascript?

How to create a customized android keyboard?

I am trying to figure out how to make a customized android keyboard. I want additional keys in the keyboard like page up, page down, etc. I want these keys to perform the actions that I want them to do. For example,
http://www.addictivetips.com/mobile/hackers-keyboard-is-a-full-5-row-on-screen-keyboard-for-android/
Have a look at the above provided keyboard layouts. How can i do this? Any useful pointers??
Thank you in advance,
Mohsin
You need to create an input method.
Read more about it here, here and here.

android add buttons on top of softkeyboard

I want to add some buttons on top of the soft keyboard (Enter and Cancel). Is there a nice way to do this or do I have to detect the keyboard being shown and add the buttons into my view?
I can't see the logic your trying to apply here.
if you add buttons above your keyboard then you lose some areas in your keyboard (for example you cant press on q w s a).
I think you should look into creating your own custom keyboard.
maybe this will help
android app specific soft keyboard
Jason
You won't be able to do this, and with good reason. If apps could modify an existing input method like this, they could trivially log all keystrokes on your device without you knowing. If you've ever installed a custom input method, you'll see a big warning that using it means trusting it not to log your keystrokes, and the functionality you're after would totally circumvent that protection.

Categories

Resources