View Binding in Data Binding sta funkciji Androida za varnejšo in bolj priročno povezavo kode z vogledi v XML-jezikih od starega findViewById. View Binding zagotavlja varne reference na vedute glede vrste; Data Binding dodatno veže podatke neposredno na razporeditve.
Problem: findViewById
The old way: findViewById to get view references:
val button = findViewById<Button>(R.id.myButton)
✗ verbose; NOT type-safe (cast errors); NOT null-safe (wrong id → null → crash at runtime)
→ View/Data Binding solve these.
