reduce emoji memory consumption

Closes #3282
// FREEBIE
This commit is contained in:
Jake McGinty 2015-05-29 15:56:00 -07:00 committed by Moxie Marlinspike
parent ce610e0262
commit 05e45e92cf
7 changed files with 6 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 347 KiB

After

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 436 KiB

After

Width:  |  Height:  |  Size: 283 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 KiB

After

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 KiB

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 KiB

After

Width:  |  Height:  |  Size: 206 KiB

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="emoji_drawer_size">36sp</dimen>
<dimen name="emoji_drawer_size">32sp</dimen>
<dimen name="min_emoji_drawer_height">200dp</dimen>
<dimen name="emoji_drawer_item_padding">3dp</dimen>
<dimen name="emoji_drawer_item_padding">5dp</dimen>
<dimen name="emoji_drawer_indicator_height">1.5dp</dimen>
<dimen name="emoji_drawer_left_right_padding">5dp</dimen>
<dimen name="conversation_item_date_text_size">12sp</dimen>

View file

@ -48,9 +48,9 @@ public class EmojiProvider {
public static final double EMOJI_FULL = 1.00;
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_RAW_HEIGHT = 96;
public static final int EMOJI_RAW_WIDTH = 102;
public static final int EMOJI_VERT_PAD = 6;
public static final int EMOJI_PER_ROW = 15;
private final Context context;
@ -264,6 +264,7 @@ public class EmojiProvider {
Log.w(TAG, ioe);
throw ioe;
} catch (BitmapDecodingException bde) {
Log.w(TAG, "page " + page + " failed.");
Log.w(TAG, bde);
throw new AssertionError("emoji sprite asset is corrupted or android decoding is broken");
}