-
-
Save SanjayDevTech/031b34f6968d55a70d60be63dfe01c27 to your computer and use it in GitHub Desktop.
MainActivity click istener
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 MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
// Click listener starts | |
findViewById<Button>(R.id.navigateBtn).setOnClickListener { | |
val intent = Intent(this, TargetActivity::class.java) | |
startActivity(intent) | |
} | |
// Click listener ends | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment