tags:

views:

434

answers:

1

The default Messaging app in Android (tested against version 2.1) appears to put the soft keyboard in a special mode, where the return key is replaced with an "emoticon key". When you press it you get a selection of emoticons to insert into your message.

Example screenshot of the keyboard in this mode

How do I instruct the soft keyboard to appear in this mode in my app?

+1  A: 

This is definitely an imeOption being set immediately on EditText. I don't know exactly which one it is, it doesn't seem to match any of the ones described here. You might be able to use Hierarchy Viewer to help you pin down what the exact options are.

David Hedlund
Thanks for the tip David, I will test this when I get chance and post back. It seems there are a few imeOption flags in the Messaging app (http://android.git.kernel.org/?p=platform/packages/apps/Mms.git;a=blob;f=res/layout/compose_message_activity.xml), I'll have a play with them.
seanhodges
actually, i'm guessing that `inputType="textShortMessage"` is what makes the emoticon-button appear, but you'll probably need to specify at least the imeOption "flagNoEnterAction" as well, as that says "don't submit this by the click of any soft keyboard button, only submit on click of the actual 'send' button". without that, the keyboard would probably just display a regular send button.
David Hedlund
You were right on it being inputType="textShortMessage". Thanks for your help.
seanhodges