连接约束删除边距

时间:2017-02-22 07:50:24

标签: android android-layout android-view android-constraintlayout

当我以编程方式设置约束时,我将视图连接到另一个视图的一侧似乎正在丢失边距(我已经为视图设置了边距):

override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {

    self.helpView.isHidden = true
}

我知道我可以获得保证金然后应用它

bottomLineView.setVisibility(View.VISIBLE);
ConstraintSet mainConstraintSet = new ConstraintSet();
mainConstraintSet.clone(mainConstraintLayout);
mainConstraintSet.connect(bottomLineView.getId(), ConstraintSet.TOP, connectingViewId, ConstraintSet.BOTTOM, 0);
mainConstraintSet.applyTo(mainConstraintLayout);
termsAndConditionsTextView.setVisibility(View.VISIBLE);

但无论如何都要留下保证金吗?

0 个答案:

没有答案