How to create constraints programmatically with ConstraintLayout in Android
Issue #381
From API < 17, there is ViewCompat.generateViewId()
For API 17, there is View.generateViewId()
Note that to use ConstraintSet
, all views under ConstraintLayout
inside xml must have unique id
1 | val imageView = ImageView(context) |