Skip to content

Instantly share code, notes, and snippets.

@davidelp68
Last active August 19, 2019 08:53
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 davidelp68/d6687239cc01f04a216f460009e6c764 to your computer and use it in GitHub Desktop.
Save davidelp68/d6687239cc01f04a216f460009e6c764 to your computer and use it in GitHub Desktop.
Andorid Studio - screenOrientation() in onCreate nel file MainActivity.kt
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val toolbar: Toolbar = findViewById(R.id.toolbar)
setSupportActionBar(toolbar)
screenOrientation() //richiamo funzione che esegue il full screen
//in modalità landscape e schermo normale in modalità portait
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment