alibaba / VirtualView-iOS

A solution to create & release UI component dynamically.
MIT License
507 stars 77 forks source link

VVVHLayout内部用layoutGravity跟padding结合有问题 #17

Closed zekunyan closed 6 years ago

zekunyan commented 6 years ago

layoutGravity="right"的时候,忽略了paddingRight的值

<?xml version="1.0" encoding="utf-8"?>
<VHLayout
        flag="flag_exposure|flag_clickable"
        action="${action}"
        orientation="V"
        layoutWidth="wrap_content"
        layoutHeight="wrap_content"
        background="#999999"
        paddingLeft="4"
        paddingRight="8"
        paddingTop="12"
        paddingBottom="16">

    <NImage
            layoutGravity="right"
            src="${imgUrl}"
            scaleType="center_crop"
            layoutWidth="100"
            layoutHeight="100"/>

    <NImage
            src="${imgUrl}"
            scaleType="center_crop"
            layoutWidth="200"
            layoutHeight="200"/>
</VHLayout>

image

zekunyan commented 6 years ago

padding、layoutGravity的问题太多 比如上面的例子,把paddingLeft改成16,第一张图就会超出去。。。

HarrisonXi commented 6 years ago

惊呆了……虽然貌似布局问题的确是挺多的。稍晚些一并解决

HarrisonXi commented 6 years ago

release 1.2.2 已解决