# EmojiCompatConfigurationView

Artifact: [androidx.appcompat:appcompat](https://developer.android.com/jetpack/androidx/releases/appcompat) [View Source](https://cs.android.com/search?q=file:androidx/appcompat/widget/EmojiCompatConfigurationView.java+class:androidx.appcompat.widget.EmojiCompatConfigurationView) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.4.0)

*** ** * ** ***


```
public interface EmojiCompatConfigurationView
```

<br />

Known direct subclasses [AppCompatAutoCompleteTextView](https://developer.android.com/reference/androidx/appcompat/widget/AppCompatAutoCompleteTextView), [AppCompatButton](https://developer.android.com/reference/androidx/appcompat/widget/AppCompatButton), [AppCompatCheckBox](https://developer.android.com/reference/androidx/appcompat/widget/AppCompatCheckBox), [AppCompatCheckedTextView](https://developer.android.com/reference/androidx/appcompat/widget/AppCompatCheckedTextView), [AppCompatEditText](https://developer.android.com/reference/androidx/appcompat/widget/AppCompatEditText), [AppCompatMultiAutoCompleteTextView](https://developer.android.com/reference/androidx/appcompat/widget/AppCompatMultiAutoCompleteTextView), [AppCompatRadioButton](https://developer.android.com/reference/androidx/appcompat/widget/AppCompatRadioButton), [AppCompatTextView](https://developer.android.com/reference/androidx/appcompat/widget/AppCompatTextView), [AppCompatToggleButton](https://developer.android.com/reference/androidx/appcompat/widget/AppCompatToggleButton), [SwitchCompat](https://developer.android.com/reference/androidx/appcompat/widget/SwitchCompat)

|---|---|
| `https://developer.android.com/reference/androidx/appcompat/widget/AppCompatAutoCompleteTextView` | A `https://developer.android.com/reference/android/widget/AutoCompleteTextView.html` which supports compatible features on older versions of the platform, including: |
| `https://developer.android.com/reference/androidx/appcompat/widget/AppCompatButton` | A `https://developer.android.com/reference/android/widget/Button.html` which supports compatible features on older versions of the platform, including: |
| `https://developer.android.com/reference/androidx/appcompat/widget/AppCompatCheckBox` | A `https://developer.android.com/reference/android/widget/CheckBox.html` which supports compatible features on older versions of the platform, including: |
| `https://developer.android.com/reference/androidx/appcompat/widget/AppCompatCheckedTextView` | A `https://developer.android.com/reference/android/widget/CheckedTextView.html` which supports compatible features on older versions of the platform, including: |
| `https://developer.android.com/reference/androidx/appcompat/widget/AppCompatEditText` | A `https://developer.android.com/reference/android/widget/EditText.html` which supports compatible features on older versions of the platform, including: |
| `https://developer.android.com/reference/androidx/appcompat/widget/AppCompatMultiAutoCompleteTextView` | A `https://developer.android.com/reference/android/widget/MultiAutoCompleteTextView.html` which supports compatible features on older version of the platform, including: |
| `https://developer.android.com/reference/androidx/appcompat/widget/AppCompatRadioButton` | A `https://developer.android.com/reference/android/widget/RadioButton.html` which supports compatible features on older versions of the platform, including: |
| `https://developer.android.com/reference/androidx/appcompat/widget/AppCompatTextView` | A `https://developer.android.com/reference/android/widget/TextView.html` which supports compatible features on older versions of the platform, including: |
| `https://developer.android.com/reference/androidx/appcompat/widget/AppCompatToggleButton` | A `https://developer.android.com/reference/android/widget/ToggleButton.html` which supports compatible features on older versions of the platform, including: |
| `https://developer.android.com/reference/androidx/appcompat/widget/SwitchCompat` | SwitchCompat is a complete backport of the core `https://developer.android.com/reference/android/widget/Switch.html` widget that brings the visuals and functionality of the toggle widget to older versions of the Android platform. |

Known indirect subclasses [EmojiAppCompatButton](https://developer.android.com/reference/androidx/emoji/widget/EmojiAppCompatButton), [EmojiAppCompatEditText](https://developer.android.com/reference/androidx/emoji/widget/EmojiAppCompatEditText), [EmojiAppCompatTextView](https://developer.android.com/reference/androidx/emoji/widget/EmojiAppCompatTextView), [GuidedActionAppCompatEditText](https://developer.android.com/reference/androidx/leanback/widget/GuidedActionAppCompatEditText), [MotionButton](https://developer.android.com/reference/androidx/constraintlayout/utils/widget/MotionButton)

|---|---|
| `https://developer.android.com/reference/androidx/emoji/widget/EmojiAppCompatButton` | AppCompatButton widget enhanced with emoji capability by using `https://developer.android.com/reference/androidx/emoji/widget/EmojiTextViewHelper`. |
| `https://developer.android.com/reference/androidx/emoji/widget/EmojiAppCompatEditText` | AppCompatEditText widget enhanced with emoji capability by using `https://developer.android.com/reference/androidx/emoji/widget/EmojiEditTextHelper`. |
| `https://developer.android.com/reference/androidx/emoji/widget/EmojiAppCompatTextView` | AppCompatTextView widget enhanced with emoji capability by using `https://developer.android.com/reference/androidx/emoji/widget/EmojiTextViewHelper`. |
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionAppCompatEditText` | A custom EditText that satisfies the IME key monitoring requirements of GuidedStepFragment. |
| `https://developer.android.com/reference/androidx/constraintlayout/utils/widget/MotionButton` | A MotionButton is an AppCompatButton that can round its edges. |

*** ** * ** ***

Interface for Views that expose EmojiCompat configuration.

## Summary

| ### Public methods |
|---|---|
| `abstract boolean` | `https://developer.android.com/reference/androidx/appcompat/widget/EmojiCompatConfigurationView#isEmojiCompatEnabled()()` |
| `abstract void` | `https://developer.android.com/reference/androidx/appcompat/widget/EmojiCompatConfigurationView#setEmojiCompatEnabled(boolean)(boolean enabled)` Configure emoji fallback behavior using EmojiCompat. |

## Public methods

### isEmojiCompatEnabled

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.4.0)

```
abstract boolean isEmojiCompatEnabled()
```

| Returns |
|---|---|
| `boolean` | the current enabled state, set via `https://developer.android.com/reference/androidx/appcompat/widget/EmojiCompatConfigurationView#setEmojiCompatEnabled(boolean)` |

### setEmojiCompatEnabled

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.4.0)

```
abstract void setEmojiCompatEnabled(boolean enabled)
```

Configure emoji fallback behavior using EmojiCompat. When enabled, this View will attempt to use EmojiCompat to enabled missing emojis. When disabled, this View will not display missing emojis using EmojiCompat. EmojiCompat must be correctly configured on a device for this to have an effect, which will happen by default if a correct downloadable fonts provider is installed on the device. If you manually configure EmojiCompat by calling EmojiCompat init after this View is constructed, you may call this method again to enable EmojiCompat on this text view. For more information about EmojiCompat configuration see the emoji2 module.

| Parameters |
|---|---|
| `boolean enabled` | if true, display missing emoji using EmojiCompat, otherwise display missing emoji using a fallback glyph "□" (known as tofu) |