Spotted a bug? Have a great idea? Help us make google.dev great!

Android Kotlin

Learn to architect and develop Android apps in the Kotlin programming language using industry-proven tools and libraries. You'll learn by building real Android apps using industry best practices, with modern app architecture. You'll use key Kotlin features to write your app code more quickly and concisely.

 

Welcome to Android with Kotlin

Codelab

Welcome to the Kotlin Android Fundamentals training course

Install Android Studio

Codelab

Install Android Studio as the first step on your learning path to becoming an Android Kotlin developer

Getting started

Codelab

Build your first Android Kotlin project and run the Hello World app

Basic Android app anatomy

Codelab

Learn your way around the files that make up an Android project, and create an app with an interactive button.

Image resources and compatibility

Codelab

Learn how to use image resources in your app. And learn about app compatibility with different Android versions.

Learn to help yourself

Codelab

In this codelab, you add a launcher icon to an app, and you learn where to find Kotlin and Android developer information and resources.

Create linear layouts using the Layout Editor

Codelab

In this codelab you learn how to use linear layouts in your Android app.

Add user interactivity

Codelab

In this codelab you learn how to add an editable text view and display the entered text.

Create constraint layouts using the Layout Editor

Codelab

In this codelab you learn how to use constraint layout in your Android app to create large and complex layouts with a flat view hierarchy.

Data-binding basics

Codelab

Learn how to use data binding to simplify code for accessing views in your Android app.

Create a fragment

Codelab

In this codelab, you learn how to create a fragment and add it to an app.

Define navigation paths

Codelab

In this codelab, you learn how to add navigation to your app. Learn how to use the navigation editor to define routes through your app; how to implement the Up button; how to add an options menu and how to implement a navigation drawer.

Start an external activity

Codelab

In this codelab, you learn how to pass parameters to a fragment using safe args to make debugging our app easier, and how to invoke an external activity in an app.

Lifecycles and logging

Codelab

In this codelab, you learn about the activity and fragment lifecycle.

Managing complex lifecycle situations

Codelab

In this codelab, you learn how to manage complex lifecycle situations.

ViewModel and ViewModelProvider

Codelab

In this codelab, you learn how to use ViewModel to enable data to survive configuration changes such as screen rotations in your Android Kotlin app.

LiveData and LiveData Observer

Codelab

In this codelab, you learn how to convert an app's UI data (data to be displayed) into encapsulated LiveData. In the ViewModel objects, you add LiveData that communicates with the app's fragments. In the fragments, you add observer methods that are notified when the value of the LiveData is changed.

DataBinding with ViewModel and LiveData

Codelab

In this codelab, you integrate LiveData and ViewModel with data binding so that the views in your layout communicate directly with ViewModel objects, without using the app's fragments to relay information. This simplifies your code and eliminates the need for click handlers in the UI controllers.

LiveData Transformations

Codelab

In this codelab, you learn how to transform LiveData into a different result, and have the UI show the new result every time the underlying LiveData changes.

Creating a Room database

Codelab

Learn how to use Room in your Android Kotlin apps. Room is a database library that's part of Android Jetpack. Room takes care of many of the chores of setting up and configuring a database, and makes it possible for your app to interact with the database using ordinary function calls.

Using Coroutines with Room

Codelab

Learn how to use Kotlin coroutines in your Android app to move database operations away from the main thread.

Recording Quality & Button States

Codelab

In this codelab, you learn more about using ViewModel and LiveData with app navigation, and you learn how to use a snackbar and control button visibility.

RecyclerView Fundamentals

Codelab

Learn how to use a RecyclerView in your Android Kotlin app to efficiently display lists of items

DiffUtil & Data Binding with RecyclerView

Codelab

Learn techniques that make RecyclerView more efficient for large lists, as well as making your code easier to maintain and extend for complex lists and grids in your Android Kotlin apps.

Grid Layout in RecyclerView

Codelab

Learn how to implement a custom LayoutManager for your RecyclerView in your Android Kotlin apps.

Interacting with RecyclerView items

Codelab

Learn how to make items in the RecyclerView clickable, implement a click listener, and navigate on click in your Android Kotlin app.

Headers in RecyclerView

Codelab

Learn how to add headers to lists and grids in RecyclerView in your Android Kotlin app.

Getting data from the internet

Codelab

Learn how to use community developed libraries to build a network layer.

Loading and displaying images from the internet

Codelab

Learn how to load and display photos from a web URL.

Filtering and detail views with internet data

Codelab

Learn how to use complex binding expressions in your layout files, and how to make Retrofit requests to a web service with query options.

Repository

Codelab

Learn to improve the user experience for an app by using offline caching.

WorkManager

Codelab

Learn how to use WorkManager to schedule a background task in an optimized and efficient way.

Styles and themes

Codelab

Learn the basics of Android's styling system and how to use attributes, styles and themes to customize your app.

Material Design, dimens, and colors

Codelab

Learn to improve the UI of a given app using Material components, dimensions, and color.

Design for everyone

Codelab

Learn how to make your app more usable by considering language orientation, visual impairments and other accessibility issues.

Android Kotlin fundamentals Quiz

Take the Android Kotlin fundamentals quiz to earn the Android Kotlin badge. You must answer 15 of the 21 questions correctly.