diff --git a/assets/emoji-0.png b/assets/emoji-0.png index a9203abbf9..22c95a5202 100644 Binary files a/assets/emoji-0.png and b/assets/emoji-0.png differ diff --git a/assets/emoji-1.png b/assets/emoji-1.png index f5eb969712..cab8c1174e 100644 Binary files a/assets/emoji-1.png and b/assets/emoji-1.png differ diff --git a/assets/emoji-2.png b/assets/emoji-2.png index 1c3bd09063..3170efab21 100644 Binary files a/assets/emoji-2.png and b/assets/emoji-2.png differ diff --git a/assets/emoji-3.png b/assets/emoji-3.png index a8659f32ac..750972072a 100644 Binary files a/assets/emoji-3.png and b/assets/emoji-3.png differ diff --git a/assets/emoji-4.png b/assets/emoji-4.png index b5e821a9a5..35ae4bae63 100644 Binary files a/assets/emoji-4.png and b/assets/emoji-4.png differ diff --git a/src/org/thoughtcrime/securesms/components/emoji/EmojiProvider.java b/src/org/thoughtcrime/securesms/components/emoji/EmojiProvider.java index d34a6ddd98..b6cf381b43 100644 --- a/src/org/thoughtcrime/securesms/components/emoji/EmojiProvider.java +++ b/src/org/thoughtcrime/securesms/components/emoji/EmojiProvider.java @@ -50,11 +50,13 @@ public class EmojiProvider { public static final double EMOJI_SMALL = 0.50; public static final int EMOJI_RAW_HEIGHT = 128; public static final int EMOJI_RAW_WIDTH = 136; + public static final int EMOJI_VERT_PAD = 8; public static final int EMOJI_PER_ROW = 15; private final Context context; private final double drawWidth; private final double drawHeight; + private final double verticalPad; private final Handler handler = new Handler(Looper.getMainLooper()); public static EmojiProvider getInstance(Context context) { @@ -71,9 +73,10 @@ public class EmojiProvider { private EmojiProvider(Context context) { int[] pages = ResUtil.getResourceIds(context, R.array.emoji_categories); - this.context = context.getApplicationContext(); - this.drawHeight = context.getResources().getDimension(R.dimen.emoji_drawer_size); - this.drawWidth = drawHeight * ((double)EMOJI_RAW_WIDTH) / EMOJI_RAW_HEIGHT; + this.context = context.getApplicationContext(); + this.drawHeight = context.getResources().getDimension(R.dimen.emoji_drawer_size); + this.drawWidth = drawHeight * ((double)EMOJI_RAW_WIDTH) / EMOJI_RAW_HEIGHT; + this.verticalPad = EMOJI_VERT_PAD * drawHeight / EMOJI_RAW_HEIGHT; Log.w(TAG, "draw size: " + drawWidth + "x" + drawHeight); for (int i = 0; i < pages.length; i++) { final EmojiPageBitmap page = new EmojiPageBitmap(i); @@ -156,9 +159,9 @@ public class EmojiProvider { canvas.drawBitmap(bmp, new Rect((int)(row_index * width), - (int)(row * height), + (int)(row * height + row * verticalPad), (int)((row_index + 1) * width), - (int)((row + 1) * height)), + (int)((row + 1) * height + row * verticalPad)), b, paint); }