-
-
Notifications
You must be signed in to change notification settings - Fork 240
Closed
Description
From @tobydeh on December 20, 2017 10:56
Im using page-router-outlet and any page with a ScrollView as the root element with a stack layout inside has a gap at the top which disappears after a few seconds then jumps up. Its something to do with the scrollview not being able to measure its height correctly. if wait until after the view has loaded then populate the list im iterating in *ngFor it doesn't happen.
The problem only occurs on iOS.
<ActionBar backgroundColor='#eaeaea'>
<NavigationButton visibility="collapsed" ></NavigationButton>
<ActionItem ios.position="left" android.position="left" (tap)="goBack()" [visibility]="this.routerExtensions.canGoBack() ? 'visible' : 'collapsed'">
<Button class="fa" text="" ></Button>
</ActionItem>
<Image src="res://images/tree" height="45" ></Image>
<ActionItem ios.position="right" android.position="right" (tap)="onFavouritesTap()">
<Button class="fa" text="" ></Button>
</ActionItem>
<ActionItem ios.position="right" android.position="right" (tap)="onSearchTap()">
<Button class="fa" text="" ></Button>
</ActionItem>
</ActionBar>
<ScrollView orientation="vertical">
<StackLayout>
<AbsoluteLayout [class.odd]="odd" [class.even]="even" class='divider p-15' (tap)="onTap(item)" *ngFor="let item of categories; let odd = odd; let even = even;">
<Image src="res://images/book-{{item.slug}}" height="90" class='book-icon m-t-15'></Image>
<Label left="80" top="5" [text]="item" class='title'></Label>
<Label left="80" top="30" text="180 recommendations" class='lead'></Label>
<Label left="80" top="50" right="0" width="70%" textWrap="true" text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua"></Label>
</AbsoluteLayout>
</StackLayout>
</ScrollView>
Copied from original issue: NativeScript/NativeScript#5191
muhassaf