© 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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.