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

Add dimens

parent b88cd88b
......@@ -77,8 +77,7 @@ class EmojiParser {
val customEmojis = EmojiRepository.getCustomEmojis()
val density = context.resources.displayMetrics.density
val px = (22 * density).toInt()
val px = context.resources.getDimensionPixelSize(R.dimen.custom_emoji_small)
return spannable.also {
regex.findAll(spannable).iterator().forEach { match ->
......
......@@ -107,8 +107,7 @@ object EmojiRepository {
saveEmojisToDatabase(allEmojis.toList())
// Prefetch all custom emojis to make cache.
val density = context.resources.displayMetrics.density
val px = (32 * density).toInt()
val px = context.resources.getDimensionPixelSize(R.dimen.custom_emoji_large)
customEmojis.forEach {
val future = Glide.with(context)
......
......@@ -5,5 +5,6 @@
<dimen name="supposed_keyboard_height">252dp</dimen>
<dimen name="picker_popup_height">250dp</dimen>
<dimen name="picker_popup_width">300dp</dimen>
</resources>
\ No newline at end of file
<dimen name="custom_emoji_large">32dp</dimen>
<dimen name="custom_emoji_small">22dp</dimen>
</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