Skip to content

android:layout_weight in the ImageLayout parent View height is avoiding the ImageLayout content from being centered #5

Open
@joao-amaro-bold

Description

@joao-amaro-bold

I found that this library has some issues in what concerns the position of the component when this is inside a ViewPager, for example.

Applying a layout_weight value to the ViewPager that contains the component (the component is the root on the fragment layout and the Fragment is included on a FragmentStatePagerAdapter) could lead to unkonwn issues. I experienced those issues when the gravity of the component is set to "center" and the fitmode is set to "auto".

I had to apply a layout_marginLeft value to the ViewPager, because the component wasn't centering on the ViewPager, as we would expect.
I played with autofit and gravity values but to no use.

This would happen and work correctly if the ViewPager had a height set to match_parent.

It would be great if this issue could be resolved soon.

Best regards.

João Amaro

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions