Welcome to the Android Kotlin Fundamentals course, created by the Google Developers Training team. This course provides a series of codelabs that lead you through the fundamentals of building Android apps using Kotlin. In this course, you learn basic Android Kotlin programming concepts and build various apps.
We recommend that you take the codelabs in sequence, but it's not a requirement.
To learn about other Android training created by the Google Developers Training team, visit Google Developers Training: Android.
Prerequisites
To take the Android Kotlin Fundamentals course, we recommend that you have at least 2 years of experience in a full-fledged object-oriented programming language such as Java, C++, or Smalltalk.
You should be familiar with all the concepts, tools, and vocabulary taught in Udacity's free Kotlin Bootcamp for Programmers course.
You should also be comfortable navigating GitHub and familiar with the following concepts:
- Basic multithreading and exception handling.
- How code is built, compiled, and executed, in general terms.
It also helps to have an idea of what functional programming is, but it's not required.
Starter and solution code
As you work through the codelabs in the Android Kotlin Fundamentals course, you create apps. The source code for starter apps and solution code for the apps that you create is in GitHub.
Android Kotlin Fundamentals includes the following pathways:
- Pathway 1: Build your first app
- Pathway 2: Build an Interactive App
- Pathway 3: Layouts
- Pathway 4: Navigation
- Pathway 5: Activity and fragment lifecycles
- Pathway 6: Architecture components
- Pathway 7: Databases and RecyclerView
- Pathway 8: Connecting to the internet
- Pathway 9: Repository
- Pathway 10: Designing for everyone
Each pathway contains several codelabs.
Pathway 1: Build your first app
This pathway teaches you how to set up Android Studio to use Kotlin and how to build apps. You start with "Hello World" and move up to an app that uses image files and a click handler. You learn how Android projects are structured, how to use and modify views in your Android Kotlin app, and how to make sure your apps are backward-compatible. You also learn about API levels and the Android Jetpack libraries.
Pathway 1 includes the following codelabs:
Pathway 2: Build An Interactive App
In this pathway, you learn how to use the Android Studio Layout Editor to create linear layouts and constraint layouts. You create apps that get and display user input, respond to user taps, and change the visibility and color of views. This pathway also teaches you how to use data binding to eliminate inefficient calls to findViewById()
.
Pathway 2 includes the following codelabs:
Pathway 3: Layouts
In this pathway, you learn how to use the Android Studio Layout Editor to create linear layouts and constraint layouts. You create apps that get and display user input, respond to user taps, and change the visibility and color of views. This pathway also teaches you how to use data binding to eliminate inefficient calls to findViewById()
.
- Linear layout using the Layout Editor
- Add user interactivity
- Constraint layout using the Layout Editor
- Data-binding basics
Pathway 4: Navigation
In this pathway, you learn how to create useful navigation in an app. You create a fragment and add it to an app, then add navigation to the app using the Android Studio navigation graph. You add a navigation drawer and an options menu to your app, and you work with the app's back stack, changing the destination of the system Back button. Finally, you learn how to invoke an external activity from within the app.
Pathway 4 includes the following codelabs:
Pathway 5: Activity and fragment lifecycles
In this pathway, you learn about the activity and fragment lifecycles, and you learn how to manage complex lifecycle situations. You work with a starter app that contains several bugs related to the Android lifecycle. You add logging to the app to better understand the app's lifecycle events, and you fix the bugs that the app contains and add some enhancements to the app. You also learn about Android Jetpack's lifecycle library, which can help you manage lifecycle events with code that's better organized and easier to maintain.
Pathway 5 includes the following codelabs:
Pathway 6: Architecture components
This pathway teaches you how to use ViewModel
and LiveData
objects. You learn how to use ViewModel
objects to enable data to survive configuration changes such as screen rotations. You convert an app's UI data into encapsulated LiveData
and add observer methods that are notified when the value of the LiveData
changes.
You also 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 technique simplifies your code and eliminates the need for click handlers in the UI controllers.
Pathway 6 includes the following codelabs:
- ViewModel and ViewModelProvider
- LiveData and LiveData observers
- DataBinding with ViewModel and LiveData
- LiveData transformations
Pathway 7: Databases and RecyclerView
Part One - Room database and coroutines:
This part of the pathway teaches you how to use the Room
database library. Room
takes care of many of the chores of setting up and configuring a database, and simplifies the code for interacting with the database. You learn how to use Kotlin coroutines to move database operations away from the main thread, and you learn more about using ViewModel
and LiveData
with app navigation.
Part Two - RecyclerView:
This part of the pathway teaches you how to use a RecyclerView
to efficiently display lists and grids of items. For complex lists and grids, you learn ways to make RecyclerView
more efficient and your code easier to maintain and extend. You learn how to make items in a RecyclerView
clickable. You also learn how to add more than one view holder and layout to lists and grids in a RecyclerView
, for example, to add a header in your app.
Pathway 7 includes the following codelabs:
- Create a Room database
- Coroutines and Room
- Record quality and button states
- RecyclerView fundamentals
- DiffUtil and data binding with RecyclerView
- GridLayout with RecyclerView
- Interacting with RecyclerView items
- Headers in RecyclerView
Pathway 8: Connecting to the internet
This pathway teaches you how to use community-developed libraries to connect to a web service to retrieve and display data. You learn how to handle potential network errors and use the Glide library to load and display photos from the internet. You also build a RecyclerView
and use it to display a grid of images.
Pathway 8 includes the following codelabs:
- Getting data from the internet
- Loading and displaying images from the internet
- Filtering and detail views with internet data
Pathway 9: Repository and WorkManager
This pathway teaches you how to add a repository to abstract the data layer and provide a clean API to the rest of your Android Kotlin app. You also learn how to use WorkManager
to schedule background tasks in an efficient and optimized way.
Pathway 9 includes the following codelabs:
Pathway 10: Designing for everyone
This pathway teaches the basics of beautiful and accessible Android app design and guides you through building an app that finds and displays information about Google Developer Group (GDG) meetups.
Pathway 10 includes the following codelabs:
Start the next step:
Start the Android Kotlin Fundamentals course by taking the first codelab, Install Android Studio.