vmironov
10/06/2015, 4:21 PMpublic inline fun <reified V : View?> View.find(id: Int): V {
val result = findViewById(id)
if (result == null && !V::class.isNullable) {
throw IllegalArgumentException("Unable to find view ${view.resources.getResourceName(id)}")
}
return result as V
}