

You can see the technique in action in the following video.įor this layout design, you may think of something like this: This technique hides the toolbar region when your application's content is being scrolled. You can implement them yourself or copy the implementation from the InitialActivity class in the starter project. Next, you are going to need some dummy data to try these techniques and populate the RecyclerView. The version listed in the official article about creating lists won't be useful this time. With the second dependency, you get the latest version of RecyclerView.

With the first dependency, you get the Android Design Support Library, which includes the new classes we need for this tutorial. Let's first add the following dependencies to your project's adle file inside the app folder: compile ':design:22.2.0'Ĭompile ':recyclerview-v7:22.2.0' I've provided a starter project, which you can download from GitHub. You can use the starter project as a starting point and use the scrolling techniques in your own applications. To try these scrolling techniques, I recommend creating a new project (with a minimum API level of 15), because your application's layout will change significantly. You can get it from the Android Developer website. To follow along, you should be using the latest version of Android Studio. With regards to scrolling techniques, it's the toolbar and the tab/search bar that respond when the content of your application is scrolling. This is where you can display images or extended app bars. When suitable, you can also use it in Google’s lateral navigation. You can read more about the usage of tabs and the different ways to display them in Google's Material Design specification.

This optional region is used to display the tabs that categorize the content of your application. It is now a more customizable view with the same functionalities. The toolbar was formerly known as the action bar.

This is where notifications appear and the status of different features of the device are displayed. Before we start, you should familiarize yourself with the available scrollable regions in an Android application. In the following image, you can see that there are four regions. In this tutorial, I'll show you how to implement the scrolling techniques shown in Google’s Material Design specification. This lets developers focus on the features that make their applications unique. As a result, many libraries were developed to solve the integration problem.ĭuring this year's Google I/O, however, Google introduced the Android Design Support Library to make the adoption of Material Design easier. But Google didn't provide developers with an easy solution to integrate them in applications. Last year, Google introduced Material Design and it became clear that motion and animation would be two of the most eye-catching features in modern Android applications.
