Repository navigation
Closed
Description
Environment
- CLI: 5.0.3
- Cross-platform modules: 5.1.0
- Android Runtime: 5.1.0
- iOS Runtime: 5.1.0
- Plugin(s):
│ nativescript-angular │ ~7.0.0 │
│ nativescript-localstorage │ ^2.0.0 │
│ nativescript-theme-core │ ~1.0.4 │
│ nativescript-ui-listview │ ^5.0.1 │
│ nativescript-ui-sidedrawer │ ^5.1.0 │
│ nativescript-websockets │ ^1.5.3 │
Describe the bug
On iPhone 6 simulator there is a space between any layout and the ActionBar, when the layout is inside a TabView. The space is part of the TabView itself, because changing its background color changes the color of the space. This does not affect any android devices. Possibly related to #3865?
To Reproduce
Please see the example down below.
Expected behavior
There should be no space between the ActionBar and the TabView content.
Sample project
tab.component.tns.html
<TabView #TabView [selectedIndex]="tabSelectedIndex" (selectedIndexChanged)="onSelectedIndexChanged($event)" androidTabsPosition="bottom">
<StackLayout class="test" *tabItem="{title: 'Dashboard'}">
<GridLayout>
<Button text="Change Tab via ngModel" (tap)="changeTab()" class="btn btn-primary btn-active"></Button>
</GridLayout>
</StackLayout>
<StackLayout class="test" *tabItem="{title: 'Rooms'}">
<StackLayout>
<Button text="Change Tab via ngModel" (tap)="changeTab()" class="btn btn-primary btn-active"></Button>
</StackLayout>
</StackLayout>
<StackLayout class="test" *tabItem="{title: 'Actions'}">
<GridLayout>
<Button text="Change Tab via ngModel" (tap)="changeTab()" class="btn btn-primary btn-active"></Button>
</GridLayout>
</StackLayout>
<StackLayout class="test" *tabItem="{title: 'Rules'}">
<StackLayout>
<Button text="Change Tab via ngModel" (tap)="changeTab()" class="btn btn-primary btn-active"></Button>
</StackLayout>
</StackLayout>
</TabView>
tab.component.tns.css
/* Add mobile styles for the component here. */
TabView {
font-size:14;
background-color: red;
tab-background-color: #30bcff;
selected-tab-text-color: rgb(255, 255, 255);
android-selected-tab-highlight-color: rgb(255, 255, 255);
tab-text-color: rgb(50, 50, 50);
}
.test {
background-color: white;
}
main.component.ios.html
<ActionBar flat="true" title="test" class="bg-primary">
<ActionItem ios.position="left">
<Label (tap)="toggleDrawer()" class="materialIcon" fontSize="24" text=""></Label>
</ActionItem>
</ActionBar>
<app-tab></app-tab>
Reacted by thesmokinghyena

Activity
NickIliev commentedon Jan 14, 2019
@enwi apart from the emulator device version can you tell us on which is the used iOS version?
Llet me know if the issue is present when the
flatproperty is set to false.enwi commentedon Jan 14, 2019
@NickIliev The iOS version of the emulator is 12.1 (16B91). When I set the
flatproperty to false the issue is not present.btaluy commentedon Jan 28, 2019
This issue still exists on IOS with flat set to true, problem disappears when set to false.
This is a major issue for us since we cant upgrade to 5.x now.
wvegteren commentedon Jan 28, 2019
This blocks upgrading to 5.x for us as well. We use a flat ActionBar in combination with tabbed navigation and this issue breaks our layout.
doktr commentedon Jan 28, 2019
Same problem applies to real devices - running iOS 12.1 on iPhone SE.
Reproduced on playground https://play.nativescript.org/?template=play-ng&id=h72cGK&v=2
victorevox commentedon Feb 5, 2019
Having same issue, also this is happening when having any layout inside UI Sidrawer and with a flat actionbar , you can see: #5855 (comment)
MartoYankov commentedon Feb 6, 2019
@victorevox I will need some more information on this.
Do you mean having any layout inside the main or the drawer content of the side drawer?
Is the flat action bar on top of the side drawer or in a page that is loaded in the main content of the side drawer?
In general, if you could provide some playground or sample it would be great.
mfik commentedon Feb 6, 2019
https://play.nativescript.org/?template=play-ng&id=sywM8A Here you go. Same problem here and on playground. Just switch flat: false for dissapearance of the spacing.
MartoYankov commentedon Feb 6, 2019
@mfik I'm aware of this problem with the TabView nested flat action bar. It should be fixed with the PR above. I was asking @victorevox for an example with the drawer that he mentioned, because I can't reproduce it. I'm also asking, so that I can add tests for it.
victorevox commentedon Feb 6, 2019
Hi @MartoYankov , here I've replicated the issue https://play.nativescript.org/?template=play-ng&id=ZyeGeF&v=3 , hope it got fixed too! :)
blizmo commentedon Feb 12, 2019
Same issue happens to tab bar when setting translucent to false
https://play.nativescript.org/?template=play-ng&id=ZyeGeF&v=4
MartoYankov commentedon Feb 12, 2019
@victorevox This issue is fixed with #6862 as well. It will be available in the 5.2 release.
@blizmo Thanks for reporting this. I logged this as a separate issue here - #6891.
lock commentedon Feb 12, 2020
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.