Skip to content

This repository is for #30DaysOfKotlin, all applications and concepts I learnt from Android Kotlin Fundamentals Codelabs.

Notifications You must be signed in to change notification settings

jainayu/Android-Kotlin-Fundamentals

Repository files navigation

#30DaysOfKotlin

Android Kotlin Fundamentals

This repository is for #30DaysOfKotlin, all applications and concepts I learnt from Android Kotlin Fundamentals Codelabs. I also draughted some of the important points I found, you can check the notes my clicking here
{Notes are updated till lesson 7.3, GridLayout with RecyclerView}

In lesson 1 I learnt how to set up Android Studio to use Kotlin and how to build apps. I started with "Hello World" and moved up to an app that uses image files and a click handler. I learnt how Android projects are structured, how to use and modify views in your Kotlin Android app, and how to make sure that our apps are backward-compatible. I also learnt about API levels and the Android Jetpack libraries.

In Lesson 2, I learnt how to use the Android Studio Layout Editor to create linear layouts and constraint layouts. I created apps that get and display user input, respond to user taps, and change the visibility and color of views. In this lesson I also learnt how to use data binding to eliminate inefficient calls to the findViewById() method.

In Lesson 3, I learnt how to create useful navigation in an app. I created a fragment and added it to an app, then I added navigation to the app using the Android Studio navigation graph. I added a navigation drawer and an options menu to the app, and I worked with the app's back stack, changing the destination of the system Back button. Finally, I learnt how to invoke an external activity from within the app.

In Lesson 4, I learnt about the activity and fragment lifecycles, and I learnt how to manage complex lifecycle situations. I worked with a starter app that contains several bugs related to the Android lifecycle. I added logging to the app to better understand the app's lifecycle events, and I fixed the bugs that the app contains and added some enhancements to the app. I also learnt about Android Jetpack's lifecycle library, which can help you manage lifecycle events with code that's better organized and easier to maintain.

Lesson 5 taught me how to use ViewModel and LiveData objects. I learnt how to use ViewModel objects to enable data to survive configuration changes such as screen rotations. I converted an app's UI data into encapsulated LiveData and added observer methods that are notified when the value of the LiveData changes.

I also integrated 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 our code and eliminates the need for click handlers in the UI controllers.

Lesson 6 taught me 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. I learnt how to use Kotlin coroutines to move database operations away from the main thread, and I learnt more about using ViewModel and LiveData with app navigation.

GoogleDeveloperFooterImage

About

This repository is for #30DaysOfKotlin, all applications and concepts I learnt from Android Kotlin Fundamentals Codelabs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published