EmojiPickerView
public final class EmojiPickerView extends FrameLayout
| java.lang.Object | ||||
| ↳ | android.view.View | |||
| ↳ | android.view.ViewGroup | |||
| ↳ | android.widget.FrameLayout | |||
| ↳ | androidx.emoji2.emojipicker.EmojiPickerView |
The emoji picker view that provides up-to-date emojis in a vertical scrollable view with a clickable horizontal header.
Summary
Public constructors |
|---|
EmojiPickerView( |
Public methods |
|
|---|---|
void |
The following functions disallow clients to add view to the EmojiPickerView |
void |
|
void |
addView(View child, ViewGroup.LayoutParams params) |
void |
addView(View child, int index, ViewGroup.LayoutParams params) |
void |
|
final int |
The number of columns of the emoji picker. |
final float |
The number of rows of the emoji picker. |
void |
The following functions disallow clients to remove view from the EmojiPickerView |
void |
removeView(View child) |
void |
removeViewAt(int index) |
void |
removeViewInLayout(View child) |
void |
removeViews(int start, int count) |
void |
removeViewsInLayout(int start, int count) |
final void |
setEmojiGridColumns(int emojiGridColumns)The number of columns of the emoji picker. |
final void |
setEmojiGridRows(float emojiGridRows)The number of rows of the emoji picker. |
final void |
setOnEmojiPickedListener(This function is used to set the custom behavior after clicking on an emoji icon. |
final void |
setRecentEmojiProvider(@NonNull RecentEmojiProvider recentEmojiProvider) |
Inherited methods |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public constructors
EmojiPickerView
public EmojiPickerView(
@NonNull Context context,
AttributeSet attrs,
int defStyleAttr
)
Public methods
addView
public void addView(View child)
The following functions disallow clients to add view to the EmojiPickerView
| Parameters | |
|---|---|
View child |
the child view to be added |
addView
public void addView(View child, ViewGroup.LayoutParams params)
| Parameters | |
|---|---|
View child |
|
ViewGroup.LayoutParams params |
addView
public void addView(View child, int index, ViewGroup.LayoutParams params)
| Parameters | |
|---|---|
View child |
|
int index |
|
ViewGroup.LayoutParams params |
addView
public void addView(View child, int width, int height)
| Parameters | |
|---|---|
View child |
|
int width |
|
int height |
getEmojiGridColumns
public final int getEmojiGridColumns()
The number of columns of the emoji picker.
Default value(EmojiPickerConstants.DEFAULT_BODY_COLUMNS: 9) will be used if emojiGridColumns is set to non-positive value.
ref androidx.emoji2.emojipicker.R.styleable.EmojiPickerView_emojiGridColumns
getEmojiGridRows
public final float getEmojiGridRows()
The number of rows of the emoji picker.
Optional field. If not set, the value will be calculated based on parent view height and emojiGridColumns. Float value indicates that the picker could display the last row partially, so the users get the idea that they can scroll down for more contents.
ref androidx.emoji2.emojipicker.R.styleable.EmojiPickerView_emojiGridRows
removeAllViews
public void removeAllViews()
The following functions disallow clients to remove view from the EmojiPickerView
removeViewsInLayout
public void removeViewsInLayout(int start, int count)
| Parameters | |
|---|---|
int start |
|
int count |
setEmojiGridColumns
public final void setEmojiGridColumns(int emojiGridColumns)
The number of columns of the emoji picker.
Default value(EmojiPickerConstants.DEFAULT_BODY_COLUMNS: 9) will be used if emojiGridColumns is set to non-positive value.
ref androidx.emoji2.emojipicker.R.styleable.EmojiPickerView_emojiGridColumns
setEmojiGridRows
public final void setEmojiGridRows(float emojiGridRows)
The number of rows of the emoji picker.
Optional field. If not set, the value will be calculated based on parent view height and emojiGridColumns. Float value indicates that the picker could display the last row partially, so the users get the idea that they can scroll down for more contents.
ref androidx.emoji2.emojipicker.R.styleable.EmojiPickerView_emojiGridRows
setOnEmojiPickedListener
public final void setOnEmojiPickedListener(
Consumer<@NonNull EmojiViewItem> onEmojiPickedListener
)
This function is used to set the custom behavior after clicking on an emoji icon. Clients could specify their own behavior inside this function.
setRecentEmojiProvider
public final void setRecentEmojiProvider(@NonNull RecentEmojiProvider recentEmojiProvider)