且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Android ConstraintLayout:如何在另一个视图下添加动态视图

更新时间:2023-01-04 21:04:58

您是说所有textview的顶部都连接在父级的顶部:

You're saying the top of all textviews are connected at the top of the parent:

set.connect(textView.getId(), ConstraintSet.TOP, 
        markerLayout.getId(), ConstraintSet.TOP, 60);

您想说的是,一个的顶部连接到另一个的底部-像这样:

You want to say, the top of one connects to the bottom of the other - something like this:

set.connect(textView.getId(), ConstraintSet.TOP, 
    previousTextView.getId(), ConstraintSet.BOTTOM, 60);

您的方法称为方法吗?