@Test @UiThreadTest public void testSetEmojiReplaceStrategy() { final Context context = InstrumentationRegistry.getTargetContext(); final EmojiExtractTextLayout layout = (EmojiExtractTextLayout) LayoutInflater.from(context) .inflate(androidx.emoji.test.R.layout.extract_view_with_attrs, null); assertEquals(EmojiCompat.REPLACE_STRATEGY_NON_EXISTENT, layout.getEmojiReplaceStrategy()); final EmojiExtractEditText extractEditText = layout.findViewById( android.R.id.inputExtractEditText); assertNotNull(extractEditText); assertEquals(EmojiCompat.REPLACE_STRATEGY_NON_EXISTENT, extractEditText.getEmojiReplaceStrategy()); layout.setEmojiReplaceStrategy(EmojiCompat.REPLACE_STRATEGY_ALL); assertEquals(EmojiCompat.REPLACE_STRATEGY_ALL, layout.getEmojiReplaceStrategy()); assertEquals(EmojiCompat.REPLACE_STRATEGY_ALL, extractEditText.getEmojiReplaceStrategy()); }
public void setEmojiReplaceStrategy(@EmojiCompat.ReplaceStrategy int replaceStrategy) { mExtractEditText.setEmojiReplaceStrategy(replaceStrategy); }
EmojiExtractTextLayout extends LinearLayout { public void setEmojiReplaceStrategy(@EmojiCompat.ReplaceStrategy int replaceStrategy) { mExtractEditText.setEmojiReplaceStrategy(replaceStrategy); } }
EmojiExtractTextLayout extends LinearLayout { public void setEmojiReplaceStrategy(@EmojiCompat.ReplaceStrategy int replaceStrategy) { mExtractEditText.setEmojiReplaceStrategy(replaceStrategy); } EmojiExtractTextLayout(Context context);  EmojiExtractTextLayout(Context context,
            @Nullable AttributeSet attrs);  EmojiExtractTextLayout(Context context,
            @Nullable AttributeSet attrs, int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  EmojiExtractTextLayout(Context context, AttributeSet attrs,
            int defStyleAttr, int defStyleRes); }
EmojiExtractTextLayout extends LinearLayout { public void setEmojiReplaceStrategy(@EmojiCompat.ReplaceStrategy int replaceStrategy) { mExtractEditText.setEmojiReplaceStrategy(replaceStrategy); } EmojiExtractTextLayout(Context context);  EmojiExtractTextLayout(Context context,
            @Nullable AttributeSet attrs);  EmojiExtractTextLayout(Context context,
            @Nullable AttributeSet attrs, int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  EmojiExtractTextLayout(Context context, AttributeSet attrs,
            int defStyleAttr, int defStyleRes); void setEmojiReplaceStrategy(@EmojiCompat.ReplaceStrategy int replaceStrategy); int getEmojiReplaceStrategy(); void onUpdateExtractingViews(InputMethodService inputMethodService, EditorInfo ei); }
EmojiExtractTextLayout extends LinearLayout { public void setEmojiReplaceStrategy(@EmojiCompat.ReplaceStrategy int replaceStrategy) { mExtractEditText.setEmojiReplaceStrategy(replaceStrategy); } EmojiExtractTextLayout(Context context);  EmojiExtractTextLayout(Context context,
            @Nullable AttributeSet attrs);  EmojiExtractTextLayout(Context context,
            @Nullable AttributeSet attrs, int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  EmojiExtractTextLayout(Context context, AttributeSet attrs,
            int defStyleAttr, int defStyleRes); void setEmojiReplaceStrategy(@EmojiCompat.ReplaceStrategy int replaceStrategy); int getEmojiReplaceStrategy(); void onUpdateExtractingViews(InputMethodService inputMethodService, EditorInfo ei);  }