# SharedPreferencesCompat.EditorCompat

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/content/SharedPreferencesCompat.java+class:androidx.core.content.SharedPreferencesCompat.EditorCompat) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***


```
public final class SharedPreferencesCompat.EditorCompat
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> This compatibility class is no longer required. Use `https://developer.android.com/reference/android/content/SharedPreferences.Editor.html` directly.

## Summary

| ### Public methods |
|---|---|
| `void` | `[apply](https://developer.android.com/reference/androidx/core/content/SharedPreferencesCompat.EditorCompat#apply(android.content.SharedPreferences.Editor))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/SharedPreferences.Editor.html editor)` **This method is deprecated.** This compatibility method is no longer required. <br /> |
| `static https://developer.android.com/reference/androidx/core/content/SharedPreferencesCompat.EditorCompat` | `[getInstance](https://developer.android.com/reference/androidx/core/content/SharedPreferencesCompat.EditorCompat#getInstance())()` **This method is deprecated.** This compatibility class is no longer required. <br /> |

## Public methods

### apply

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public void [apply](https://developer.android.com/reference/androidx/core/content/SharedPreferencesCompat.EditorCompat#apply(android.content.SharedPreferences.Editor))(@NonNull SharedPreferences.Editor editor)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> This compatibility method is no longer required. Use `https://developer.android.com/reference/android/content/SharedPreferences.Editor.html#apply()` directly.

### getInstance

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static SharedPreferencesCompat.EditorCompat [getInstance](https://developer.android.com/reference/androidx/core/content/SharedPreferencesCompat.EditorCompat#getInstance())()
```

> [!CAUTION]
> **This method is deprecated.**   
>
> This compatibility class is no longer required. Use `https://developer.android.com/reference/android/content/SharedPreferences.Editor.html` directly.