Last active
October 7, 2017 22:02
-
-
Save gcherubini/93dd5c691b78ec11889dbdd90cf4b8a6 to your computer and use it in GitHub Desktop.
Simplifying Android activities with Kotlin - 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HomeActivity : AppCompatActivity() { | |
val layoutFile = R.layout.activity_home | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
val binding: ActivityHomeBinding = DataBindingUtil.setContentView(this, layoutFile) | |
binding?.btnSend?.setOnClickListener { btnSendActions(binding) } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment