android - PaddingStart和PaddingEnd配对的问题
PHP中文网
PHP中文网 2017-04-17 17:52:18
0
1
1328

在layout xml中给一个控件添加paddingStart属性但没有添加paddingEnd属性时,会有如下xml error:
when you define paddingStart you should probably also define paddingEnd for right-to-left symmetry...
这句话是说paddingStartpaddingEnd需要成对出现,但是我并不太明白为什么一定要成对出现,求赐教。

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
黄舟

l2r: paddingStart=paddingLeft, paddingEnd=paddingRight
r2l: paddingStart=paddingRight, paddingEnd=paddingLeft

In other words, paddingLeft and paddingRight must be used in pairs
paddingStart and paddingEnd must be used in pairs
PaddingLeft/Right and paddingStart/End must not be mixed

For example:
paddingLeft and paddingEnd are mixed
In the case of r2l, both parameters represent the padding on the left, there will be a conflict

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template