Skip to content

[iOS only] Percentage margin of layouts not possible #2850

Closed

Description

@tsonevn

From @martinwepner on October 5, 2016 16:11

I'm trying to to set the margin of a GridLayout/StackLayout with a percentage value like 30%. In the android emulator everything works fine, but the iOS emulator only takes fixed values like 87.

Example:
start.xml:

    <StackLayout orientation="vertical">
        <Label text="test" />
        <Label text="test" />
        <Label text="test" />
        <Label text="test" />
    </StackLayout>

start.css:

StackLayout
{
    margin: 30% 15% 30% 15%;
    background-color: #FAFAFA;
    border-width: 1;
    border-style: solid;
    border-color: #C7C7CC;
    border-radius: 1;
}

doesn't work as well (only for iOS)

    <StackLayout orientation="vertical" width="75%" height="45%">
        <Label text="test" />
        <Label text="test" />
        <Label text="test" />
        <Label text="test" />
    </StackLayout>

PS: i'm not sure if this is the right section for this, first i just googled nativescript bugtracker and now i saw this section here is for cli only

Copied from original issue: NativeScript/nativescript-cli#2097

Activity

  1. tsonevn commented on Oct 6, 2016

    @tsonevn
    ContributorAuthor

    Hi @alg,
    Thank you for reporting this issue.

    I confirm that this is a real problem, when you setting up margins with percentage. The issue is reproducible for iOS.

    Regards,
    @tsonevn

  2. added this to the 2.4.0 milestone on Oct 10, 2016
  3. self-assigned this
    on Oct 10, 2016
  4. zh-m commented on Oct 20, 2016

    @zh-m
    Contributor
  5. added
    ready for testTSC needs to test this and confirm against live production apps and automated test suites
    on Oct 21, 2016
  6. added and removed
    ready for testTSC needs to test this and confirm against live production apps and automated test suites
    on Oct 26, 2016
  7. removed their assignment
    on Nov 1, 2016
  8. lock commented on Aug 29, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  9. locked and limited conversation to collaborators on Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions