EmojiAppCompatEditText
class EmojiAppCompatEditText : AppCompatEditText
| kotlin.Any | |||||
| ↳ | 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. maxEmojiCount
Summary
Public constructors |
|---|
EmojiAppCompatEditText(context: Context!) |
EmojiAppCompatEditText(context: Context!, attrs: AttributeSet!) |
EmojiAppCompatEditText( |
Public functions |
|
|---|---|
Int |
Returns the maximum number of EmojiSpans to be added to a CharSequence. |
InputConnection! |
onCreateInputConnection(outAttrs: EditorInfo!)If a |
Unit |
setKeyListener(keyListener: KeyListener?)Adds EmojiCompat KeyListener to correctly edit multi-codepoint emoji when they've been converted to spans. |
Unit |
setMaxEmojiCount(maxEmojiCount: @IntRange(from = 0) Int)Set the maximum number of EmojiSpans to be added to a CharSequence. |
Inherited Constants |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public constructors
EmojiAppCompatEditText
EmojiAppCompatEditText(context: Context!, attrs: AttributeSet!)
EmojiAppCompatEditText
EmojiAppCompatEditText(
context: Context!,
attrs: AttributeSet!,
defStyleAttr: Int
)
Public functions
getMaxEmojiCount
fun getMaxEmojiCount(): Int
Returns the maximum number of EmojiSpans to be added to a CharSequence.
| See also | |
|---|---|
setMaxEmojiCount |
|
process |
onCreateInputConnection
fun onCreateInputConnection(outAttrs: EditorInfo!): InputConnection!
If a listener is set, the returned InputConnection will use it to handle calls to commitContent.
setKeyListener
fun setKeyListener(keyListener: KeyListener?): Unit
Adds EmojiCompat KeyListener to correctly edit multi-codepoint emoji when they've been converted to spans.
setMaxEmojiCount
fun setMaxEmojiCount(maxEmojiCount: @IntRange(from = 0) 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: @IntRange(from = 0) Int |
maximum number of EmojiSpans to be added to a single CharSequence, should be equal or greater than 0 |
| See also | |
|---|---|
process |