@Test @UiThreadTest public void testSetKeyListener_withNull() { final TestActivity activity = mActivityRule.getActivity(); final EmojiEditText editText = activity.findViewById(R.id.editTextWithMaxCount); editText.setKeyListener(null); assertNull(editText.getKeyListener()); }
@Override public void setKeyListener(@Nullable KeyListener keyListener) { if (keyListener != null) { keyListener = getEmojiEditTextHelper().getKeyListener(keyListener); } super.setKeyListener(keyListener); }
EmojiEditText extends EditText { @Override public void setKeyListener(@Nullable KeyListener keyListener) { if (keyListener != null) { keyListener = getEmojiEditTextHelper().getKeyListener(keyListener); } super.setKeyListener(keyListener); } }
EmojiEditText extends EditText { @Override public void setKeyListener(@Nullable KeyListener keyListener) { if (keyListener != null) { keyListener = getEmojiEditTextHelper().getKeyListener(keyListener); } super.setKeyListener(keyListener); } EmojiEditText(Context context);  EmojiEditText(Context context, AttributeSet attrs);  EmojiEditText(Context context, AttributeSet attrs, int defStyleAttr); @RequiresApi(Build.VERSION_CODES.LOLLIPOP)  EmojiEditText(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes); }
EmojiEditText extends EditText { @Override public void setKeyListener(@Nullable KeyListener keyListener) { if (keyListener != null) { keyListener = getEmojiEditTextHelper().getKeyListener(keyListener); } super.setKeyListener(keyListener); } EmojiEditText(Context context);  EmojiEditText(Context context, AttributeSet attrs);  EmojiEditText(Context context, AttributeSet attrs, int defStyleAttr); @RequiresApi(Build.VERSION_CODES.LOLLIPOP)  EmojiEditText(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes); @Override void setKeyListener(@Nullable KeyListener keyListener); @Override InputConnection onCreateInputConnection(EditorInfo outAttrs); void setMaxEmojiCount(@IntRange(from = 0) int maxEmojiCount); int getMaxEmojiCount(); }
EmojiEditText extends EditText { @Override public void setKeyListener(@Nullable KeyListener keyListener) { if (keyListener != null) { keyListener = getEmojiEditTextHelper().getKeyListener(keyListener); } super.setKeyListener(keyListener); } EmojiEditText(Context context);  EmojiEditText(Context context, AttributeSet attrs);  EmojiEditText(Context context, AttributeSet attrs, int defStyleAttr); @RequiresApi(Build.VERSION_CODES.LOLLIPOP)  EmojiEditText(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes); @Override void setKeyListener(@Nullable KeyListener keyListener); @Override InputConnection onCreateInputConnection(EditorInfo outAttrs); void setMaxEmojiCount(@IntRange(from = 0) int maxEmojiCount); int getMaxEmojiCount();  }