There has to be a more idiomatic way to write some...
# codereview
j
There has to be a more idiomatic way to write something like this, right?
Copy code
if (layoutParams != null) {
    layoutParams.height = size.toInt()
    layoutParams.width = size.toInt()
} else {
    layoutParams = ViewGroup.LayoutParams(size.toInt(), size.toInt())
}