Mark
01/16/2020, 2:45 AMfun childVisible(left: Int, top: Int, right: Int, bottom: Int): Boolean
and I want to pass in the properties of an Android Rect
. Is there a way to do the following more concisely?
val (childLeft, childTop, childRight, childBottom) = childRect
return childVisible(childLeft, childTop, childRight, childBottom)
Adam Powell
01/16/2020, 2:51 AMreturn childRect.run { childVisible(left, top, right, bottom) }
Adam Powell
01/16/2020, 2:52 AMwith(childRect) { ... }
if you don't need the fluent chaining styleAdam Powell
01/16/2020, 2:52 AMMark
01/16/2020, 2:54 AMAdam Powell
01/16/2020, 2:56 AMchildVisible
though if you're going to use this in enough places where you're worried about getting the order wrongMatteo Mirk
01/16/2020, 8:43 AMMarat Akhin
01/16/2020, 8:54 AMRect
, which calls childVisible
with the correct argumentsDico
01/16/2020, 10:21 AM(l, t, r, b)