1

我正在以编程方式将我的视图添加到约束布局。视图有一个图像和标题,应该在图像的底部有一些边距。当我将边距应用于文本视图时,边距也适用于图像。

下面是我的代码

set.connect(showimage.getId(), ConstraintSet.START, ConstraintSet.PARENT_ID, ConstraintSet.START, 0);
    set.connect(showtitle.getId(), ConstraintSet.START, showimage.getId(), ConstraintSet.START, 100);
    set.connect(showtitle.getId(), ConstraintSet.BOTTOM, showimage.getId(), ConstraintSet.BOTTOM, 0);

这是我得到的输出有人可以帮我吗

在此处输入图像描述

4

0 回答 0