mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 18:43:49 +00:00
parent
d5be43cc85
commit
3716d69b0b
@ -21,6 +21,7 @@ public class EmojiPageView extends FrameLayout implements VariationSelectorListe
|
||||
private GridLayoutManager layoutManager;
|
||||
private RecyclerView.OnItemTouchListener scrollDisabler;
|
||||
private VariationSelectorListener variationSelectorListener;
|
||||
private EmojiVariationSelectorPopup popup;
|
||||
|
||||
public EmojiPageView(@NonNull Context context,
|
||||
@NonNull EmojiSelectionListener emojiSelectionListener,
|
||||
@ -34,8 +35,9 @@ public class EmojiPageView extends FrameLayout implements VariationSelectorListe
|
||||
recyclerView = view.findViewById(R.id.emoji);
|
||||
layoutManager = new GridLayoutManager(context, 8);
|
||||
scrollDisabler = new ScrollDisabler();
|
||||
popup = new EmojiVariationSelectorPopup(context, emojiSelectionListener);
|
||||
adapter = new EmojiPageViewGridAdapter(EmojiProvider.getInstance(context),
|
||||
new EmojiVariationSelectorPopup(context, emojiSelectionListener),
|
||||
popup,
|
||||
emojiSelectionListener,
|
||||
this);
|
||||
|
||||
@ -54,6 +56,13 @@ public class EmojiPageView extends FrameLayout implements VariationSelectorListe
|
||||
adapter.setEmoji(model.getDisplayEmoji());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onVisibilityChanged(@NonNull View changedView, int visibility) {
|
||||
if (visibility != VISIBLE) {
|
||||
popup.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
||||
int idealWidth = getContext().getResources().getDimensionPixelOffset(R.dimen.emoji_drawer_item_width);
|
||||
|
Loading…
x
Reference in New Issue
Block a user