Skip to content

Instantly share code, notes, and snippets.

@AkshayChordiya
Last active April 21, 2017 03:58
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/4b423d81fefd143b205b57c4a759c9ca to your computer and use it in GitHub Desktop.
Save AkshayChordiya/4b423d81fefd143b205b57c4a759c9ca to your computer and use it in GitHub Desktop.
Kotlin Article: MainActivity.kt with Android Extensions
// Using R.layout.activity_main
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
// Instead of findView(R.id.toolbar) as Toolbar
setSupportActionBar(toolbar)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment