Skip to content

Instantly share code, notes, and snippets.

@heitorpaceli
Created March 2, 2022 03:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heitorpaceli/60ad29a476fc34539fa6013aac1b0838 to your computer and use it in GitHub Desktop.
Save heitorpaceli/60ad29a476fc34539fa6013aac1b0838 to your computer and use it in GitHub Desktop.
updateActivityTitle
private fun updateActivityTitle() {
val localeManager = getSystemService(LocaleManager::class.java)
val appLocales = localeManager.applicationLocales
title = if (appLocales.isEmpty) {
getString(R.string.system_locale)
} else {
appLocales.get(0).displayName
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment