ugur
ugur

Reputation: 3654

How to change emoji size in com.vanniktech.emoji.EmojiTextView

I am trying to implement Emoji keyboard for a chat app. I am using https://github.com/vanniktech/Emoji library.

  1. In emoji edittext emoji size is big enough but when i push send button it shows small emoji in emoji textview.

    i couldn't see any attributes in the sample for emoji size.

    See the picture below for the problem. I want emojis in the textView as big as in editText.

    enter image description here

  2. How to store text with resource id or code (replaces the emoji) to store it in the database and use later.

Upvotes: 2

Views: 2923

Answers (2)

DragonFire
DragonFire

Reputation: 4102

Use app:emojiSize="30sp"

This can be used in <com.vanniktech.emoji.EmojiTextView /> Or <com.vanniktech.emoji.EmojiEditText />

Upvotes: 0

nshmura
nshmura

Reputation: 6010

  1. Use app:emojiSize attribute. This attribute will also work for EmojiTextView. (Here is source.)
    Or use EmojiTextView#setEmojiSize method.

  2. I am not sure. But the string that is taken by EmojiEditText#getText().toString() should contain unicode of emoji. So I think you can store this string to database and use it later. I Infer this from source code.

Upvotes: 2

Related Questions