mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-27 03:18:47 +00:00
refactor emoji code into package
1) EmojiTextView and EmojiEditText are used instead of using code to emojify text. 2) Emoji categories' code points are specified in XML 3) EmojiDrawer itself is a fragment, and its pages are also fragments, allowing for better memory management. Fixes #2938 Fixes #2936 Closes #3153 // FREEBIE
This commit is contained in:
committed by
Moxie Marlinspike
parent
2bee953560
commit
bf133c65c3
@@ -0,0 +1,24 @@
|
||||
package org.thoughtcrime.securesms.components.emoji;
|
||||
|
||||
import android.support.annotation.DrawableRes;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
public class StaticEmojiPageModel implements EmojiPageModel {
|
||||
@DrawableRes private final int icon;
|
||||
@NonNull private final int[] codePoints;
|
||||
|
||||
public StaticEmojiPageModel(@DrawableRes int icon, @NonNull int[] codePoints) {
|
||||
this.icon = icon;
|
||||
this.codePoints = codePoints;
|
||||
}
|
||||
|
||||
public int getIconRes() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
@NonNull public int[] getCodePoints() {
|
||||
return codePoints;
|
||||
}
|
||||
|
||||
@Override public void onCodePointSelected(int codePoint) { }
|
||||
}
|
||||
Reference in New Issue
Block a user