Up to this point, in order to update our UI, we have been pushing data into widgets from our Java or Kotlin code.

This article explores where to use Android’s data binding support to perhaps simplify your Android app development.

Data binding is an opt-in feature, in part because it…

HILT made Dependency Injection Easy.

Let's see How...

Integrating Dagger-Hilt

Add This to your build.gradle(:app)

Add this to your build.gradle(project)

Yup! we are all set.

Don't forget to click “sync now”

Step 1

Create MyApplication that extends Application.

We need to annotate with @HiltAndroidApp.

Hilt needs to know where our application class…

Coroutines != Thread

The biggest misconception about coroutines. Let’s try to understand this word better.

Co + routines = Cooperative functions working together.

What are cooperative functions?

pass control to funB()
pass control to funB()

DataBinding binds data directly to the UI of your App.

Sounds fascinating!! So let's learn by doing it.

Step 1:

Enable DataBinding in your App

In build.gradle add

buildFeatures {
dataBinding true

Step 2:

In activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"

tanya anand

Android Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store