1Select the src/main/java folder in the project and choose
2 Code->"Convert Java File to Kotlin File”
1 private fun toggleLeftDrawer() {
2 if (drawerLayout.isDrawerOpen(leftDrawerMenu)) {
3 drawerLayout.closeDrawer(leftDrawerMenu)
4 } else {
5 drawerLayout.openDrawer(leftDrawerMenu)
6 }
7 }