parent
d5be43cc85
commit
3716d69b0b
1 changed files with 10 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue