2017-08-16 12 views
-1

我想使用unicodes而不是emojiDrawable Images)。任何人都可以幫助! 所有我得到的圖書館爲emoji其中我們使用可繪製的圖像,但我想用Unicode代替它們。 可能嗎?Android使用Unicode代替圖片作爲表情符號

+0

這個鏈接可以幫助你的https://stackoverflow.com/questions/26893796/how-set-使用Unicode字符代替全鍵盤(表情符號列表)sovled它emoji-by-unicode-in-android-textview –

+0

從中選擇表情符號gt的鍵盤有圖像。我不想在繪圖中存儲表情符號的圖像。 \t 如何使用unicode在鍵盤上顯示emojis? – Renu

回答

1

我在地方的表情符號

0

儘管答案建議可行,但您找到表情符號庫的原因是因爲Android上的表情符號非常分散,而且非常依賴於設備。

從我的經驗來看,很難保證表情符號會顯示在所有設備上。

linked answer可以工作,但你應該測試你想在不同設備上使用的表情符號。

int unicode = 0x1F60A; 

public String getEmojiByUnicode(int unicode){ 
    return new String(Character.toChars(unicode)); 
} 

myTextView.setText(getEmojiByUnicode(unicode)); 
+0

從中選擇表情符號gt的鍵盤有圖像。我不想在繪圖中存儲表情符號的圖像。 – Renu

+0

如何使用unicode在鍵盤上顯示emojis? – Renu

+0

如果用戶通過鍵盤輸入表情符號到「EditText」之類,我相信它應該仍然是unicode。你正在嘗試顯示錶情符號還是你正在使用表情符號? –

相關問題