O'Reilly logo

Mastering Android Development with Kotlin by Miloš Vasić

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the navigation drawer

As you probably remember, in our mockup we have presented that there will be links to filtered data (Notes and Todos). We will filter these by using the navigation drawer. Every modern application uses a navigation drawer. It's a piece of the UI that displays the application's navigation options. To define the drawer, we have to put the DrawerLayout view in our layout. Open activity_main and apply the following modification:

    <?xml version="1.0" encoding="utf-8"?> 
    <android.support.v4.widget.DrawerLayout    xmlns:android= "http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required