setIdTag

fun View.setIdTag(@IdRes tag: Int?)

Sets the tag of the View to the given tag ID reference.

Unlike View.setTag, this forces usage of a type-safe resource ID.

Useful in tests to find views with no or an autogenerated ID. Tagged views can be found with withIdTag in module testing_functional.