Get immediate access to this and over 1,500+ other videos and books.

Boost your skills with a raywenderlich.com Beginner subscription. With over 60+ video courses and our core foundational programming books bundled in one subscription, it’s simply the best investment you can make in your development career.

Navigate to the About Page

This video was last updated on Jul 14 2022

Learn about Intents and see how it can be used to navigate to the second screen.

Contributors

Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

You can unlock the rest of this video course, and our entire catalogue of books and videos, with a raywenderlich.com Professional subscription.

To navigate to the about acitvity, you’ll be working with something called an Intent. An Intent is just an object that that is used to communicate between components in Android. It is commonly used to communicate between activities. For example, it can be used to start another activity and it can also be used to send data between activities.

private fun navigateToAboutPage() {
    
}
val intent = Intent(this, AboutActivity::class.java)
startActivity(intent)
binding.infoButton?.setOnClickListener {
  navigateToAboutPage()
}
android:parentActivityName=".MainActivity"
android:screenOrientation="landscape"
title = getString(R.string.about_page_title)
  private lateinit var binding: ActivityAboutBinding

  override fun onCreate(savedInstanceState: Bundle?) {
    ...
    binding = ActivityAboutBinding.inflate(layoutInflater)
    setContentView(binding.root)
    ...
binding.backButton?.setOnClickListener {
  finish()
}

Reviews

Comments