Guest User

Untitled

a guest
May 24th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. class NavigationDrawerActivity : AppCompatActivity() {
  2.  
  3. override fun onCreate(savedInstanceState: Bundle?) {
  4. super.onCreate(savedInstanceState)
  5. setContentView(R.layout.activity_navigation_drawer)
  6. setSupportActionBar(toolBar)
  7. title = "Navigation Drawer Activity"
  8. supportActionBar!!.setDisplayHomeAsUpEnabled(true)
  9. supportActionBar!!.setDisplayShowTitleEnabled(false)
  10. setUpDrawerToggle()
  11. NavigationUI.setupWithNavController(navView, Navigation.findNavController(this, R.id.navDrawerActivity)) // here navView using Kotlin extension to avoid findviewbyid
  12. }
  13. }
Add Comment
Please, Sign In to add comment