Skip to content

Instantly share code, notes, and snippets.

@elihart
Created November 20, 2019 20:58
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 elihart/afe36771a419c19a7534b5323641831b to your computer and use it in GitHub Desktop.
Save elihart/afe36771a419c19a7534b5323641831b to your computer and use it in GitHub Desktop.
ForceClearingAndroidResourceCache
AppCompatDrawableManager.get().onConfigurationChanged(view.context)
val resources = view.resources
val currentConfig = resources.configuration
val currentDisplayMetrics = resources.displayMetrics
resources.updateConfiguration(null, currentDisplayMetrics)
resources.updateConfiguration(currentConfig, currentDisplayMetrics)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment