Just curious… is there any big advantage to using Butterknife over Kotlin Android Extensions?
The only way I know to have Butterknife make the array/list for you is to list all of the IDs:
val views: List<Button> by bindViews(
R.id.btn_1,
R.id.btn_2,
R.id.btn_3,
R.id.btn_4,
R.id.btn_5,
R.id.btn_6,
R.id.btn_7,
R.id.btn_8,
R.id.btn_9 )
With Kotlin Android Extensions, you still have to list them, but it’s much more concise:
val views = listOf(btn_1, btn_2, btn_3, btn_4, btn_5, btn_6, btn_7, btn_8, btn_9)
I know there are other things Butterknife can do (like enabling or disabling sets of view at once) but most of those features come out naturally almost as concise in idiomatic Kotlin anyway.
Just wondering if there’s something I’m missing…