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