View Binding a Data Binding jsou Android features pro propojení kódu se zobrazeními v XML layoutech bezpečněji a pohodlněji než starý findViewById. View Binding poskytuje type-safe reference na zobrazení; Data Binding navíc váže data přímo do layoutů.
Problém: 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.
