View Binding in Android | How to use View Binding in Android | Kotlin | Android | View Binding

Published: 01 January 2023
on channel: Coding with Dev
3,819
56

Hello Guys, welcome to my #codingwithdev​ channel In This tutorial will help you understand the concept of view binding in Android using Kotlin.

Short Description:-
View binding is a feature that allows you to more easily write code that interacts with views. Once view binding is enabled in a module, it generates a binding class for each XML layout file present in that module. An instance of a binding class contains direct references to all views that have an ID in the corresponding layout.

In most cases, view binding replaces #findViewById.

Enabling the ViewBinding Feature:
There is a need to enabling the ViewBinding feature in Android Studio 4.0 and above, inside the app-level build gradle file.

android {
buildFeatures {
viewBinding = true
}
}


Please 👍𝐋𝐢𝐤𝐞 ,👤𝗦𝗵𝗲𝗮𝗿,✎𝐂𝐨𝐦𝐦𝐞𝐧𝐭 And ☝𝐒ᴜʙ𝐒ʀɪʙᴇ My 𝗬𝗢𝗨𝗧𝗨𝗕𝗘 Channel


𝗰𝗹𝗶𝗰𝗸 𝗳𝗼𝗿 𝗺𝗼𝗿𝗲 𝘃𝗶𝗱𝗲𝗼𝘀 -    / codingwithdev​  


Follow 𝐅𝐚𝐜𝐞𝐛𝐨𝐨𝐤 -   / coding-with-.  .

Follow 𝐈𝐧𝐬𝐭𝐚𝐠𝐫𝐚𝐦 -   / codingwithdev  

Follow 𝐆𝐢𝐭𝐡𝐮𝐛 - https://github.com/devendrachavan

Follow 𝐌𝐞𝐝𝐢𝐮𝐦 -   / devendrac706  


𝐅𝐨𝐫 𝐁𝐮𝐬𝐬𝐢𝐧𝐞𝐬𝐬 𝐈𝐧𝐪𝐮𝐢𝐫𝐢𝐞𝐬
[email protected]


𝐒ᴜʙ𝐒ʀɪʙᴇ My 𝗬𝗢𝗨𝗧𝗨𝗕𝗘 Channel #𝗰𝗼𝗱𝗶𝗻𝗴𝘄𝗶𝘁𝗱𝗲𝘃​ for more latest videos..
   / codingwithdev​  
Thank You :-)

#Android #AndroidStudio #kotlin #KotlinAndroidAppDevelopement #ViewBinding #findViewById #TextView #ImageView #Button #activity #fragment #adapter
#androidstudioforbeginners #AndroidStudioTutorialForBeginners #androidKotlinTutorial #KotlinTutorial #codingwithdev