I am trying to figure out how the emoji (emoticon) selections are implemented on the Facebook
app and the Google Hangouts
app. I looked into the SoftKeyboard
Demo app in the Android API Samples but the display of these emoji views does not look like a SoftKeyboard
. It looks and behaves more like a custom Dialog
view. Does anyone have an idea of how these are implemented?
Facebook App
Google Hangouts app
Also, is Unicode the best way to send emoticons or is there an alternative? I noticed that some Unicode
sequences like \u1F601
don't render the corresponding emoticon and instead that sequence just shows up as 1
:
EditText messageInput = (EditText) findViewById(R.id.message_input);
messageInput.getText().append("\u1F601");