I'm saving value of the current locale into SharedPreferences,
viewmodel's data should be changed by current locale, so I have to use SharedPreferences..
private fun getPreferences(context: Context): SharedPreferences {
return context.getSharedPreferences(PREFERENCES_NAME, Context.MODE_PRIVATE)
}
this code needs context , I don't know how can I use SharedPreferences in Viewmodel..