此刻,我正在玩一下新的ConstraintLayout并尝试创建以下布局:
(1)标题:类型24sp,领先32sp (2)分目1:类型15sp,领先24sp (3)32sp线高 (4)在按钮顶部和复制中心之间填充56dp (5)24dp垂直填充
我现在的问题是,我不知道如何处理引用第二个TextView中心的大小。 我们没有约束中心(或基线)底部或类似的东西。 此外,我无法在基线点之间连接的两个视图之间设置空格。 那么我应该如何使用ConstraintLayout创建此布局?
有人可以给我从上面的图片样本布局吗?
At the moment I'm playing a bit with the new ConstraintLayout and try to create the following layout:
(1) Headline: Type 24sp, Leading 32sp (2) Subhead 1: Type 15sp, Leading 24sp (3) 32sp line height (4) 56dp padding between the top of button and the center of copy (5) 24dp vertical padding
My problem now is that I do not know how I should handle the sizes which refer to the center of the second TextView. We do not have a constraint for the center (or baseline) to bottom or something like this. Also I'm not able to set a space between two views which are connected between the baseline points. So how should I create this layout with the ConstraintLayout?
Can someone please give me a sample layout from the picture above?
最满意答案
我们只允许基线到基线,目前没有保证金。 我们可能会在未来重新审视这个问题,但是作为ConstraintLayout alpha 7,你不能这样做。 唯一的选择是与顶部/底部对齐。
We only allow baseline to baseline, without margin for now. We might revisit this in the future, but as of ConstraintLayout alpha 7 you cannot do this. The only option is to align with top / bottom.
更多推荐
发布评论