View BindingとData Bindingは、古いfindViewByIdよりも安全で便利にXMLレイアウトのビューをコードに接続するAndroidの機能です。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.
