EmojiEditText

open class EmojiEditText : EditText
kotlin.Any
   ↳ android.view.View
   ↳ android.widget.TextView
   ↳ android.widget.EditText
   ↳ androidx.emoji.widget.EmojiEditText

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

Summary

Public constructors
<init>(context: Context!)

<init>(context: Context!, attrs: AttributeSet!)

<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)

<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int, defStyleRes: Int)

Public methods
open Unit
setMaxEmojiCount(maxEmojiCount: Int)

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

open Int

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

open Unit
setKeyListener(@Nullable keyListener: KeyListener?)

open Unit

See TextViewCompat#setCustomSelectionActionModeCallback(TextView, ActionMode.Callback)

open InputConnection!

Public constructors

<init>

EmojiEditText(context: Context!)

<init>

EmojiEditText(context: Context!, attrs: AttributeSet!)

<init>

EmojiEditText(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)

<init>

EmojiEditText(context: Context!, attrs: AttributeSet!, defStyleAttr: Int, defStyleRes: Int)

Public methods

setMaxEmojiCount

open fun setMaxEmojiCount(maxEmojiCount: Int): Unit

Set the maximum number of EmojiSpans to be added to a CharSequence. The number of spans in a CharSequence affects the performance of the EditText insert/delete operations. Insert/delete operations slow down as the number of spans increases.

Parameters
maxEmojiCount Int: maximum number of EmojiSpans to be added to a single CharSequence, should be equal or greater than 0

getMaxEmojiCount

open fun getMaxEmojiCount(): Int

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

setKeyListener

open fun setKeyListener(@Nullable keyListener: KeyListener?): Unit

setCustomSelectionActionModeCallback

open fun setCustomSelectionActionModeCallback(actionModeCallback: Callback!): Unit

See TextViewCompat#setCustomSelectionActionModeCallback(TextView, ActionMode.Callback)

onCreateInputConnection

open fun onCreateInputConnection(outAttrs: EditorInfo!): InputConnection!