Android Keyboard with Emoji

倖福魔咒の 提交于 2019-11-27 12:44:59
Sheharyar

As @dbar pointed out, the answer is:

android:inputType="textShortMessage"

But in my case, I was already using textMultiLine, so I had to use the both of them together:

android:inputType="textMultiLine|textShortMessage"

Looks like this:

I'm not sure about the Exact android version, but this should work only on Android 4.1 and above

dbar

Finally the answer was:

android:inputType="textShortMessage"

The new line key becomes a key to take out the emoji keyboard. The only quibble is the 'new line' key from the keyboard disappears with this configuration (before you could long press to choose between emoji/new line but now it's only emoji).

In Google Hangout, the emoji button is not on the keyboard (at least on my phone which is already using a third party keyboard), it's inside of the TextEdit box, and so it's part of the application itself (Gabe, I'm talking about the latest Google Hangout on top of KitKat with emoji support, all the current screenshots I found of Google Hangout do not show what I'm seeing on my phone, so this must be a very recent feature).

This is actually pretty easy to do, placing an ImageButton to the right of a TextView inside a RelativeLayout (the RelativeLayout which is made to look like a TextView with a custom background).

Then, it's just a matter of hiding the keyboard when clicking on that ImageButton and replacing it with a panel full of emojis when that happens (like in this open source emoji android keyboard, which is under a creative commons non-commercial license).

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!