Chapter 26. Advanced UI with Navigation Drawer and Fragment
In this chapter, we will see what is (arguably) the most advanced UI. The NavigationView
, or navigation drawer because of the way it slides out its content, can be created simply by choosing it as a template when you create a new project. We will do just that, and then we will examine the auto-generated code and learn how to interact with it. We will then use everything we know about Fragment
to populate each of the "drawers" with different behaviors and views. Then, in the next chapter, we will learn about databases to add some new functionality to each Fragment
.
In this chapter, the following topics will be covered:
- Introducing
NavigationView
- Getting started with the simple database app
- Implementing a
NavigationView
using the project template - Adding multiple Fragments and layouts to
NavigationView
Let's take a look at this extremely cool UI pattern.