View Binding და Data Binding არის Android-ის ფუნქციები, რომლებიც აკავშირებენ კოდს XML განლაგებებში მდებარე ხედებთან უფრო უსაფრთხოდ და მოხერხებულად, ვიდრე ძველი findViewById. View Binding უზრუნველყოფს ტიპის უსაფრთხო ხედის მითითებებს; Data Binding დამატებით აკავშირებს მონაცემებს პირდაპირ განლაგებებში.
პრობლემა: 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.
