View Binding, replace findViewById and can be used both with Java and Kotlin

Поділитися
Вставка
  • Опубліковано 15 жов 2024
  • #StayHome #WithMe
    #Viewbinding 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 #bindingClass 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.
    ⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've been using Kite for 6 months and I love it! www.kite.com/g...
    FREE $100 credit @Digital Ocean: m.do.co/c/3208...
    Patreon: / trulymittal
    Subscribe: www.youtube.co...
    GitHub (Tutorial): github.com/tru...
    ViewBinding: developer.andr...
    ---------------
    More useful videos
    ---------------
    #RecyclerView: • Recycler View with com...
    #ViewModel: • View Model | Live Data...
    #NavigationComponent: • Navigation Component |...
    #WorkManager: • Work Manager | Android...
    #Retrofit: • RETROFIT Tutorial (v 2...
    #CollapsingToolbar Layout: • Collapsing Toolbar Lay...
    #BottomNavigation View: • Bottom Navigation View...
    KeyframeAnimations: • Keyframe Animations wi...
    NightMode: • Night Mode | Dark Mode...
    ButterKnife: • Butter Knife | Field a...
    SplashScreen: • Splash screen | Launch...
    Singletons: • Singletons | What When...
    Pull to Refresh in RecyclerView: • Pull to Refresh in Rec...
    On item click using Interface in RecyclerView: • RecyclerView item Clic...
    Swipe gestures in Recycler View: • Swipe gestures in Recy...
    Drag and drop Reorder in Recycler View: • Drag and drop Reorder ...
    Filter using #SearchView in RecyclerView: • Filter RecyclerView us...
    MultiView RecyclerView: • Multi view RecyclerVie...
    ---------------
    Other useful Playlists
    ---------------
    Android: • Android
    #Firebase: • Firebase | Build a Not...
    #RestAPI (#NodeJS and MongoDB): • REST API using NodeJS ...
    Docker: • Docker
    MongoDB: • Learn MongoDB in 50 mi...
    Html/Css/Js: • HTML / CSS / JS
    Challenges: • Challenges
    ---------------
    What I use
    ---------------
    Mouse: amzn.to/2O9RJtu
    Keyboard: amzn.to/2qxajCU
    Keyboard 2: amzn.to/2XDWH4X
    Monitor: amzn.to/2pDg7dH
    Processor: amzn.to/347WWIb
    RAM: amzn.to/2QEkUqw
    Graphics: amzn.to/33aBrF4
    Microphone: amzn.to/2DabdI9
    #yoursTRULY #tutorial #howto #android

КОМЕНТАРІ • 52

  • @gibraanjafar1669
    @gibraanjafar1669 3 роки тому +2

    Thanks man. For the quality content you deliver, I don't mind watching the adverts during the vids.

  • @rajeshvq
    @rajeshvq 3 роки тому +1

    Many tutorial I watched but yours is the best

  • @assassinhitman
    @assassinhitman 2 роки тому +2

    Excellent. Concise and well explained.

  • @fazaljarral2792
    @fazaljarral2792 4 роки тому +5

    Thank you. Learned a new thing today

  • @ajaywaghe6663
    @ajaywaghe6663 4 роки тому +3

    भावा ! आता तर राडाच. खतरनाक ! i was eagerly waiting . Please Make Videos On android background Service.

  • @fassihurrehman3585
    @fassihurrehman3585 2 роки тому +1

    Thanks for an easy content.

  • @AshishKumar-px3tj
    @AshishKumar-px3tj 3 роки тому +1

    Thank you 💓 doubt got resolved

  • @TheAbhidugar
    @TheAbhidugar 3 роки тому +1

    I used view binding but main activity xml wasn't inflating. Either it was giving exception or it was not showing layout on phone. I also added a custom style in manifest file to hide Action bar in main activity only. But after hours of experimenting I removed view binding and used old way of setcontentview(R.layout.activity_main) and it worked.
    can you please confirm this?

  • @shabeenmhmd6219
    @shabeenmhmd6219 3 роки тому +1

    BaseActivity layouts didn't work properly in OtherActivity which extends baseActivity . Any solution sir?

  • @AtulGupta-jj7ek
    @AtulGupta-jj7ek 4 роки тому +1

    Hey can you please make a tutorial on How we use Geofire and what's the purpose of using Geofire over other available options

  • @fluffymaverick
    @fluffymaverick 3 роки тому +1

    Hi Bro! what is the font you use in this theme? looks cool 🔥🔥🔥

  • @bite027_ketansharma6
    @bite027_ketansharma6 2 роки тому

    great tutorial, thanks!

    • @mafiacodes
      @mafiacodes  2 роки тому

      You're welcome, Subscribe Like Share

  • @vijayjangid8967
    @vijayjangid8967 3 роки тому +1

    GREAT VIDEO!

  • @tamirmoav3774
    @tamirmoav3774 3 роки тому +1

    very easy and useful. thank you!
    I don't understand why google developers could not think about this before, so we must always learn new methods, make us believe that there is a fake evolution of software programming. I mean come on! didn't Google developers noticed before that findViewById can cause runtime errors?? didnt they noticed that using a costumed list was very complicated?

  • @arkamondal6160
    @arkamondal6160 4 роки тому +1

    Thank you sir. Sir please more video on viewbinding

  • @maheshprasad8509
    @maheshprasad8509 4 роки тому

    I want to know one thing. if you see in the MainActivity file. there are a date and file size. how to do that

  • @annguyenhoang3589
    @annguyenhoang3589 4 роки тому +2

    Nice contents, keep making video sir.

  • @vickynegi1345
    @vickynegi1345 4 роки тому +2

    Great work as always :) ,
    Do you have videos on data binding too ?

  • @johnfriend2010
    @johnfriend2010 4 роки тому +1

    gracias bien explicado rapido y sencillo

  • @hemalparmar8284
    @hemalparmar8284 2 роки тому

    I enabled the activity binding but when i type ActivityMainBinding in Mai activity file i got error

  • @harishreddy8247
    @harishreddy8247 4 роки тому +1

    super explanation please show me difference viewbinding and databinding in one video

  • @Mar1juananas
    @Mar1juananas 2 роки тому

    I love you from France

  • @alishechka29
    @alishechka29 3 роки тому +1

    thank you sir

  • @MCStarYT
    @MCStarYT 4 роки тому

    Is this similar to the Kotlin feature that you don't need findViewById()

  • @programacaopro8717
    @programacaopro8717 4 роки тому +1

    Works with fragments

  • @techbrainz
    @techbrainz 4 роки тому

    ActivityMainBinding class is not generating in android gradle plugin veraion 3.6.1

    • @mafiacodes
      @mafiacodes  4 роки тому

      Try rebuilding ur project and why u wanna use this gradle plugin?

    • @techbrainz
      @techbrainz 4 роки тому

      @@mafiacodes wt u asking why i wanna use 3.6.1 u r asking na bro or u saying i ahould have to use 3.6.2 gradle version

  • @aksheysharma4769
    @aksheysharma4769 4 роки тому +1

    This video do not contain Kotlin Code

    • @mafiacodes
      @mafiacodes  4 роки тому +1

      Yes it contains JAVA code

  • @gaganyadav9146
    @gaganyadav9146 3 роки тому +1

    thanks bro

  • @Mirtguitar
    @Mirtguitar 11 місяців тому

    good tutorial

  • @techbrainz
    @techbrainz 4 роки тому

    Can we use viewbinding in gradle plugin version 3.6.1

    • @mafiacodes
      @mafiacodes  4 роки тому

      I don't see any use of using gradle 3.6.1 but you can try that, the basic requirement is Android Studio 3.6 Canary 11+
      Subscribe like share...

  • @harishreddy8247
    @harishreddy8247 4 роки тому

    thanks sir please do more videos

  • @harishreddy8247
    @harishreddy8247 4 роки тому

    please try to multiple video it's understandle good ide text color

  • @alifdoll6372
    @alifdoll6372 4 роки тому

    Thnks sir

  • @mrkaydev
    @mrkaydev 3 роки тому

    Bruh , what's the font name ??

    • @mafiacodes
      @mafiacodes  3 роки тому +1

      operator mono

    • @mrkaydev
      @mrkaydev 3 роки тому +1

      @@mafiacodes Really thank you, your rply is way faster than my gradle sync time : )

  • @sunilkumarmaurya4562
    @sunilkumarmaurya4562 4 роки тому

    Every thing is fine. Aap itna fast kyu bolte hai. Kuchh point samajh me he nahi aata

    • @mafiacodes
      @mafiacodes  4 роки тому

      Next time will keep this thing in mind

  • @shreyasjoshi7796
    @shreyasjoshi7796 4 роки тому +1

    I'm the 69th viewer!

  • @AtulGupta-jj7ek
    @AtulGupta-jj7ek 4 роки тому +1

    Hey can you please make a tutorial on How we use Geofire and what's the purpose of using Geofire over other available options