is there a way to get every view that is inside my activity? I have over 200 views including buttons, and images, so i want to be able to access them by using a loop
Nice way to do this in Kotlin recursivelly:
private fun View.getAllViews(): List { if (this !is ViewGroup || childCount == 0) return listOf(this) return children .toList() .flatMap { it.getAllViews() } .plus(this as View) }