📜  在线将 kotlin 代码转换为 java - Kotlin 代码示例

📅  最后修改于: 2022-03-11 14:53:33.078000             🧑  作者: Mango

代码示例10
private fun loading(view: View, loading: Boolean) {
        view.takeIf { view is ViewGroup }?.let {
            for (i in 0 until (view as ViewGroup).childCount) {
                val childAt = view.getChildAt(i)
                (childAt as? ISkeletonDrawer)?.let {
                    if (!loading) {
                        it.startLoading()
                    } else {
                        it.stopLoading()
                    }
                }
                run { loading(childAt, loading) }
            }
        }

    }