EmojiExtractTextLayout

public class EmojiExtractTextLayout
extends LinearLayout

java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.LinearLayout
         ↳ androidx.emoji2.widget.EmojiExtractTextLayout


Layout that contains emoji compatibility enhanced ExtractEditText. Should be used by InputMethodService implementations.

Call onUpdateExtractingViews(InputMethodService, EditorInfo) from InputMethodService#onUpdateExtractingViews(EditorInfo).

 public class MyInputMethodService extends InputMethodService {
     // ..
     @Override
     public View onCreateExtractTextView() {
         mExtractView = getLayoutInflater().inflate(R.layout.emoji_input_method_extract_layout,
                 null);
         return mExtractView;
     }

     @Override
     public void onUpdateExtractingViews(EditorInfo ei) {
         mExtractView.onUpdateExtractingViews(this, ei);
     }
 }
 
R.attr.emojiReplaceStrategy

Summary

Inherited constants

Inherited fields

Public constructors

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

Public methods

int getEmojiReplaceStrategy()

Returns whether to replace all emoji with EmojiSpans.

void onUpdateExtractingViews(InputMethodService inputMethodService, EditorInfo ei)

Initializes the layout.

void setEmojiReplaceStrategy(int replaceStrategy)

Sets whether to replace all emoji with EmojiSpans.

Inherited methods