Summary and Next Steps

Kotlin and Android Development featuring Jetpack — by Michael Fazio (16 / 125)

The Pragmatic Programmers
The Pragmatic Programmers

--

👈 What Else Do We Need? | TOC | Chapter 2 Build Views with Fragments 👉

As a review (or for those of you who just skipped the last twenty-five or so pages), here’s what we just did:

  • Created a new app called Penny Drop.
  • Created two Fragment classes: PickPlayersFragment and GameFragment.
  • Created a <menu> called navigation.xml with our two Fragments as items.
  • Added two images as Vector Assets.
  • Created a navigation graph called nav_graph.xml and included both Fragment classes as destinations.
  • Added a container <FragmentContainerView> and BottomNavigationView to activity_main.xml.
  • Connected everything in MainActivity.

The foundation for our app is complete. We can use the bottom nav to move around the app, and adding more options just takes a Fragment plus a few XML items. Until we start adding theming, the MainActivity is complete. And we have a couple of Fragments just waiting to be completed, which is our next stop. We know we can get to both Fragment classes, so now we’re going to make them useful.

Copyright © 2021, The Pragmatic Bookshelf.

👈 What Else Do We Need? | TOC | Chapter 2 Build Views with Fragments 👉

Kotlin and Android Development featuring Jetpack by Michael Fazio can be purchased in other book formats directly from the Pragmatic Programmers. If you notice a code error or formatting mistake, please let us know here so that we can fix it.

--

--

The Pragmatic Programmers
The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.