How access the ID's from XML file without using findviewbyid

preview_player
Показать описание
How access the ID's from XML file without using findviewbyid ?

3 methods have been discussed to access your UI elements :

1) findViewByID() - one of the oldest way (old-fashioned way?)
Well, the simple old findViewById() method provides a way for you to make reference to a View from within your Kotlin code. In other words, it binds Views to the Kotlin code.

2) synthetic property from Kotlin Extensions ( deprecated today?)

3) View Binding - a relatively new way to access your UI elements using generated binding object

How access the ID's of XML file without using findviewbyid
Рекомендации по теме
Комментарии
Автор

Thanks a lot. You saved me for the day! Love from India!

hvl
Автор

Really well explained, thank you. I will check your other videos.

leosousa
Автор

Thanks for view binding tutorials do more videos view binding and data binding live data every one is waiting for that

harishreddy
Автор

Thank you, trying to learn Android Studio and was stuck on not being able to call anything.

Kuunmorsian
Автор

Hey! do you offer tutoring? Thx! Iam going for the newest Google certification for Android kotlin dev.

rcolon