felldo / JEmoji

Java Emoji (JEmoji) is a lightweight fast emoji library for Java with the purpose to improve and ease working with emojis
Apache License 2.0
49 stars 9 forks source link

Get emojis sorted #52

Open Inky-developer opened 1 week ago

Inky-developer commented 1 week ago

What feature are you proposing?

I was trying to implement a basic emoji picker using this library. However it does not seem to be possible to get the emojis in an order which is useful for emoji pickers. Could you provide an api that allows accessing emojis in order?

Do you have any additional material for your feature proposal?

No response

felldo commented 1 week ago

While this is something that can be easily done on the users side because I already expose the emoji list (EmojiManager.getAllEmojis), I think it is still a good QOL feature if we can gather a couple of different orders. Do you have any particular orders in mind?

Inky-developer commented 1 week ago

I think the order how they are listed here for example could be helpful: https://emojipedia.org/smileys Ideally, there should be a way to get the emojis in an order that is similar to most emoji pickers on smartphones. For reference, when I access emojis via EmojiManager.getAllEmojis, it looks like this, since they are stored in an unordered set: image

Code:

```kotlin @Preview @Composable fun EmojiDemo() { LazyVerticalGrid(columns = GridCells.Fixed(8)) { items(EmojiManager.getAllEmojis().toList()) { Text(it.emoji) } } } ```
felldo commented 1 week ago

What you are looking for is not exactly an ordered list of emojis but much more emojis mapped to their group / subgroup. Regardless of that, I still think that this might be a good enhancement.