Google 致力于为黑人社区推动种族平等。查看具体举措


public class EmojiAppCompatEditText
extends AppCompatEditText

   ↳ android.view.View
     ↳ android.widget.TextView
       ↳ android.widget.EditText
         ↳ androidx.appcompat.widget.AppCompatEditText
           ↳ androidx.emoji.widget.EmojiAppCompatEditText

AppCompatEditText widget enhanced with emoji capability by using EmojiEditTextHelper. When used on devices running API 18 or below, this widget acts as a regular AppCompatEditText. R.attr.maxEmojiCount


Inherited constants

Inherited fields

Public constructors

EmojiAppCompatEditText(Context context)
EmojiAppCompatEditText(Context context, AttributeSet attrs)
EmojiAppCompatEditText(Context context, AttributeSet attrs, int defStyleAttr)

Public methods

int getMaxEmojiCount()

Returns the maximum number of EmojiSpans to be added to a CharSequence.

InputConnection onCreateInputConnection(EditorInfo outAttrs)

If a listener is set, the returned InputConnection will use it to handle calls to InputConnection.commitContent(InputContentInfo, int, Bundle).

void setKeyListener(KeyListener keyListener)
void setMaxEmojiCount(int maxEmojiCount)

Set the maximum number of EmojiSpans to be added to a CharSequence.

Inherited methods