added in version 26.1.0
belongs to Maven artifact com.android.support:support-emoji:28.0.0-alpha1

EmojiExtractTextLayout

public class EmojiExtractTextLayout
extends LinearLayout

java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.LinearLayout
         ↳ android.support.text.emoji.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);
     }
 }
 

Summary

XML attributes

EmojiExtractTextLayout_emojiReplaceStrategy  

Inherited constants

From class android.widget.LinearLayout
From class android.view.ViewGroup
From class android.view.View

Inherited fields

From class android.view.View

Public constructors

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

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

From class android.widget.LinearLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.view.ViewParent
From interface android.view.ViewManager
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource

XML attributes

EmojiExtractTextLayout_emojiReplaceStrategy

Related methods:

Public constructors

EmojiExtractTextLayout

added in version 26.1.0
EmojiExtractTextLayout (Context context)

Parameters
context Context

EmojiExtractTextLayout

added in version 26.1.0
EmojiExtractTextLayout (Context context, 
                AttributeSet attrs)

Parameters
context Context

attrs AttributeSet

EmojiExtractTextLayout

added in version 26.1.0
EmojiExtractTextLayout (Context context, 
                AttributeSet attrs, 
                int defStyleAttr)

Parameters
context Context

attrs AttributeSet

defStyleAttr int

EmojiExtractTextLayout

added in version 26.1.0
EmojiExtractTextLayout (Context context, 
                AttributeSet attrs, 
                int defStyleAttr, 
                int defStyleRes)

Parameters
context Context

attrs AttributeSet

defStyleAttr int

defStyleRes int

Public methods

getEmojiReplaceStrategy

added in version 26.1.0
int getEmojiReplaceStrategy ()

Returns whether to replace all emoji with EmojiSpans. Default value is REPLACE_STRATEGY_DEFAULT.

Related XML Attributes:

Returns
int one of REPLACE_STRATEGY_DEFAULT, REPLACE_STRATEGY_NON_EXISTENT, REPLACE_STRATEGY_ALL

onUpdateExtractingViews

added in version 26.1.0
void onUpdateExtractingViews (InputMethodService inputMethodService, 
                EditorInfo ei)

Initializes the layout. Call this function from InputMethodService#onUpdateExtractingViews(EditorInfo).

Parameters
inputMethodService InputMethodService

ei EditorInfo

setEmojiReplaceStrategy

added in version 26.1.0
void setEmojiReplaceStrategy (int replaceStrategy)

Sets whether to replace all emoji with EmojiSpans. Default value is REPLACE_STRATEGY_DEFAULT.

Related XML Attributes:

Parameters
replaceStrategy int: should be one of REPLACE_STRATEGY_DEFAULT, REPLACE_STRATEGY_NON_EXISTENT, REPLACE_STRATEGY_ALL