Skip to content

Instantly share code, notes, and snippets.

@AkshayChordiya
Last active April 20, 2017 04:04
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 AkshayChordiya/c3963430451db62c6119636382858f94 to your computer and use it in GitHub Desktop.
Save AkshayChordiya/c3963430451db62c6119636382858f94 to your computer and use it in GitHub Desktop.
Kotlin Article: MainActivity.kt with Views
class MainActivity : AppCompatActivity() {
var mToolbar: Toolbar? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
bindViews()
setSupportActionBar(mToolbar)
}
private fun bindViews() {
mToolbar = findViewById(R.id.toolbar) as Toolbar
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment