# SharedPreferencesCompat.EditorCompat

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/content/SharedPreferencesCompat.EditorCompat "View this page in Java")

<br />

```
class SharedPreferencesCompat.EditorCompat
```

<br />

*** ** * ** ***

| **This class is deprecated.**   
|
| This compatibility class is no longer required. Use[SharedPreferences.Editor](https://developer.android.com/reference/android/content/SharedPreferences.Editor.html)directly.

## Summary

|                                                                        ### Public functions                                                                        |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                      | ~~[apply](https://developer.android.com/reference/kotlin/androidx/core/content/SharedPreferencesCompat.EditorCompat#apply(android.content.SharedPreferences.Editor))~~`(editor: `[SharedPreferences.Editor](https://developer.android.com/reference/android/content/SharedPreferences.Editor.html)`)` **This function is deprecated.** This compatibility method is no longer required. <br /> |
| `java-static `[SharedPreferencesCompat.EditorCompat](https://developer.android.com/reference/kotlin/androidx/core/content/SharedPreferencesCompat.EditorCompat)`!` | ~~[getInstance](https://developer.android.com/reference/kotlin/androidx/core/content/SharedPreferencesCompat.EditorCompat#getInstance())~~`()` **This function is deprecated.** This compatibility class is no longer required. <br />                                                                                                                                                         |

## Public functions

### 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)  

```
fun [apply](https://developer.android.com/reference/kotlin/androidx/core/content/SharedPreferencesCompat.EditorCompat#apply(android.content.SharedPreferences.Editor))(editor: SharedPreferences.Editor): Unit
```
| **This function is deprecated.**   
|
This compatibility method is no longer required. Use[apply](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)  

```
java-static fun [getInstance](https://developer.android.com/reference/kotlin/androidx/core/content/SharedPreferencesCompat.EditorCompat#getInstance())(): SharedPreferencesCompat.EditorCompat!
```
| **This function is deprecated.**   
|
| This compatibility class is no longer required. Use[SharedPreferences.Editor](https://developer.android.com/reference/android/content/SharedPreferences.Editor.html)directly.