Skip to content

Instantly share code, notes, and snippets.

@hosseiniSeyRo
Created April 18, 2020 08:37
Show Gist options
  • Save hosseiniSeyRo/ab7f1410dac89cc51a7c1091494ab86c to your computer and use it in GitHub Desktop.
Save hosseiniSeyRo/ab7f1410dac89cc51a7c1091494ab86c to your computer and use it in GitHub Desktop.
RtL Direction to whole app
open class BaseActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val configuration: Configuration = resources.configuration
configuration.setLayoutDirection(Locale("fa"))
resources.updateConfiguration(configuration, resources.displayMetrics)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment