Kotlin / anko

Pleasant Android application development
Apache License 2.0
15.9k stars 1.28k forks source link

Should avoid call lparams no barrier inside constraintLayout. #733

Open ghost opened 5 years ago

ghost commented 5 years ago

I'm using constraintLayout programmatically, and spend few hours to detect the bug about use barrier.

Call the inline function lparams on barrier is a wrong call, should prevent user to call it accidentally.

constraintLayout {
    barrier {
        id = R.id.id5
        type = Barrier.BOTTOM
        referencedIds = intArrayOf(R.id.id2, R.id.id4)
    } // .lparams(wrapContent, wrapContent)  // must avoid to use lparams here