© Ted Hagos 2019
Ted HagosAndroid Studio IDE Quick Referencehttps://doi.org/10.1007/978-1-4842-4953-6_10

10. Navigation

Ted Hagos1 
(1)
Manila, National Capital Region, Philippines
 
What this chapter covers:
  • A review of navigation in Android

  • Navigation components

Navigation Before Architecture Components

In the early days of Android, if you had a non-trivial app, you almost certainly needed to partition your app across multiple activities. That meant you needed the skill to navigate from one activity to another, and back. So, in those days, you might have written something that looked like the code in Listing 10-1.
class FirstActivity extends AppCompatActivity
  implements View.OnClickListener {
  public void onClick(View v) {
    Intent intent = new Intent(this, ...

Get Android Studio IDE Quick Reference: A Pocket Guide to Android Studio Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.