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?

funA(){
1...
2...
pass control to funB()
5...
6...
pass control to funB()
}
funB(){
3...
4…

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

android{ 
...
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"
xmlns:tools="http://schemas.android.com/tools">…

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