Skip to content

Styling differences of nested StackLayouts with padding and vertical alignment between iOS and Android #4593

@vtrifonov

Description

@vtrifonov

I have some issues with the styling of StackLayout on iOS and Android when using padding. To isolate the issue I've created a new application with the following template:
tns create layout --tsc

Here's the changed code of the main-page.xml:

<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page" actionBarHidden="true">
    <StackLayout style="padding: 20" verticalAlignment="center" backgroundColor="red">
       <StackLayout height="60%" backgroundColor="green" borderRadius="10">
       </StackLayout>
    </StackLayout>
</Page>

And here's the output in both platforms:
Screenshots


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions