Updated emoji set.
Includes display support for more genders, and more notably, skin tones. These are not currently selectable in the UI, but they will be rendered properly when other clients send them.
Before Width: | Height: | Size: 337 KiB After Width: | Height: | Size: 333 KiB |
Before Width: | Height: | Size: 812 KiB After Width: | Height: | Size: 812 KiB |
Before Width: | Height: | Size: 610 KiB After Width: | Height: | Size: 604 KiB |
Before Width: | Height: | Size: 694 KiB After Width: | Height: | Size: 691 KiB |
Before Width: | Height: | Size: 873 KiB After Width: | Height: | Size: 866 KiB |
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 5.1 MiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 482 KiB After Width: | Height: | Size: 487 KiB |
@ -3,6 +3,7 @@ package org.thoughtcrime.securesms.components.emoji;
|
||||
public interface EmojiPageModel {
|
||||
int getIconAttr();
|
||||
String[] getEmoji();
|
||||
String[] getDisplayEmoji();
|
||||
boolean hasSpriteMap();
|
||||
String getSprite();
|
||||
boolean isDynamic();
|
||||
|
@ -69,7 +69,7 @@ public class EmojiPageView extends FrameLayout {
|
||||
}
|
||||
|
||||
@Override public int getCount() {
|
||||
return model.getEmoji().length;
|
||||
return model.getDisplayEmoji().length;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -95,7 +95,7 @@ public class EmojiPageView extends FrameLayout {
|
||||
view = emojiView;
|
||||
}
|
||||
|
||||
view.setEmoji(model.getEmoji()[position]);
|
||||
view.setEmoji(model.getDisplayEmoji()[position]);
|
||||
return view;
|
||||
}
|
||||
}
|
||||
|
@ -50,6 +50,10 @@ public class RecentEmojiPageModel implements EmojiPageModel {
|
||||
return toReversePrimitiveArray(recentlyUsed);
|
||||
}
|
||||
|
||||
@Override public String[] getDisplayEmoji() {
|
||||
return getEmoji();
|
||||
}
|
||||
|
||||
@Override public boolean hasSpriteMap() {
|
||||
return false;
|
||||
}
|
||||
|
@ -7,11 +7,17 @@ import android.support.annotation.Nullable;
|
||||
public class StaticEmojiPageModel implements EmojiPageModel {
|
||||
@AttrRes private final int iconAttr;
|
||||
@NonNull private final String[] emoji;
|
||||
@NonNull private final String[] displayEmoji;
|
||||
@Nullable private final String sprite;
|
||||
|
||||
public StaticEmojiPageModel(@AttrRes int iconAttr, @NonNull String[] emoji, @Nullable String sprite) {
|
||||
this(iconAttr, emoji, emoji, sprite);
|
||||
}
|
||||
|
||||
public StaticEmojiPageModel(@AttrRes int iconAttr, @NonNull String[] emoji, @NonNull String[] displayEmoji, @Nullable String sprite) {
|
||||
this.iconAttr = iconAttr;
|
||||
this.emoji = emoji;
|
||||
this.displayEmoji = displayEmoji;
|
||||
this.sprite = sprite;
|
||||
}
|
||||
|
||||
@ -19,19 +25,28 @@ public class StaticEmojiPageModel implements EmojiPageModel {
|
||||
return iconAttr;
|
||||
}
|
||||
|
||||
@NonNull public String[] getEmoji() {
|
||||
@Override
|
||||
public @NonNull String[] getEmoji() {
|
||||
return emoji;
|
||||
}
|
||||
|
||||
@Override public boolean hasSpriteMap() {
|
||||
@Override
|
||||
public @NonNull String[] getDisplayEmoji() {
|
||||
return displayEmoji;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSpriteMap() {
|
||||
return sprite != null;
|
||||
}
|
||||
|
||||
@Override @Nullable public String getSprite() {
|
||||
@Override
|
||||
public @Nullable String getSprite() {
|
||||
return sprite;
|
||||
}
|
||||
|
||||
@Override public boolean isDynamic() {
|
||||
@Override
|
||||
public boolean isDynamic() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|