Commit 7dfe80c1 authored by Leonardo Aramaki's avatar Leonardo Aramaki

Add dimens

parent b88cd88b
...@@ -77,8 +77,7 @@ class EmojiParser { ...@@ -77,8 +77,7 @@ class EmojiParser {
val customEmojis = EmojiRepository.getCustomEmojis() val customEmojis = EmojiRepository.getCustomEmojis()
val density = context.resources.displayMetrics.density val px = context.resources.getDimensionPixelSize(R.dimen.custom_emoji_small)
val px = (22 * density).toInt()
return spannable.also { return spannable.also {
regex.findAll(spannable).iterator().forEach { match -> regex.findAll(spannable).iterator().forEach { match ->
......
...@@ -107,8 +107,7 @@ object EmojiRepository { ...@@ -107,8 +107,7 @@ object EmojiRepository {
saveEmojisToDatabase(allEmojis.toList()) saveEmojisToDatabase(allEmojis.toList())
// Prefetch all custom emojis to make cache. // Prefetch all custom emojis to make cache.
val density = context.resources.displayMetrics.density val px = context.resources.getDimensionPixelSize(R.dimen.custom_emoji_large)
val px = (32 * density).toInt()
customEmojis.forEach { customEmojis.forEach {
val future = Glide.with(context) val future = Glide.with(context)
......
...@@ -5,5 +5,6 @@ ...@@ -5,5 +5,6 @@
<dimen name="supposed_keyboard_height">252dp</dimen> <dimen name="supposed_keyboard_height">252dp</dimen>
<dimen name="picker_popup_height">250dp</dimen> <dimen name="picker_popup_height">250dp</dimen>
<dimen name="picker_popup_width">300dp</dimen> <dimen name="picker_popup_width">300dp</dimen>
<dimen name="custom_emoji_large">32dp</dimen>
</resources> <dimen name="custom_emoji_small">22dp</dimen>
\ No newline at end of file </resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment