Skip to content

IOS: Actionbar Flat property not aligning the content of the page correctly after setting it to true #6063

Closed

Description

@btaluy

Tell us about the problem

When setting the Actionbar property flat to true, this gives weird aligning of the content, the content falls back behind the actionbar and the content needs margin top to move the content down.

Which platform(s) does your issue occur on?

iOS

Please provide the following version numbers that your issue occurs with:

  • CLI: 4.1.2
  • Cross-platform modules: 4.1.0
  • Runtime(s): TNS-ios: 4.1.1
  • Plugin(s): N/A

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

<ActionBar [title]="" class="" flat="true">
  <NavigationButton android:icon="res://ic_back" (tap)="onBack()"></NavigationButton>
</ActionBar>

<StackLayout/GridLayout/DockLayout..etc etc>
 // Content
</StackLayout/GridLayout/DockLayout..etc etc>

screen shot 2018-07-13 at 11 05 22
This how it looks at the moment when giving margin-top of 16 to the content container

NEW UPDATE!!
Bug can be reproduced with the following project:

https://github.com/YvesCandel/nativescript-flat-actionbar-bug/commits/master

It seems to be a problem when defining a transition to the routerextension.navigate function.
If we remove the transition we add then it works as expected.

Activity

  1. self-assigned this
    on Jul 13, 2018
  2. tsonevn commented on Jul 13, 2018

    @tsonevn
    Contributor

    Hi @btaluy,
    I tested your case on my side, however, was unable to recreate the issue. I am attaching a link to the NativeScript Playground project. Please review it and make the needed changes, which will help us to recreate the problem.

  3. btaluy commented on Jul 13, 2018

    @btaluy
    Author

    I forgot to mention that I am using nativescript-angular @tsonevn

  4. tsonevn commented on Jul 16, 2018

    @tsonevn
    Contributor

    HI @btaluy,
    I tested the issue in a sample NativeScript Angular project, however, I am still unable to recreate the problem. Please review the attached project and make the needed changes, which will allow us to reproduce the problem.
    Archive.zip

  5. tsonevn commented on Jul 25, 2018

    @tsonevn
    Contributor

    closing due to inactivity

  6. YoussefGheith commented on Sep 6, 2018

    @YoussefGheith

    Same problem for me

  7. btaluy commented on Oct 22, 2018

    @btaluy
    Author

    @tsonevn Any news on this issue?

  8. tsonevn commented on Oct 23, 2018

    @tsonevn
    Contributor

    Hi @btaluy,
    This issue should be fixed with NativeScript 5.0

  9. JakubPawlak commented on Nov 6, 2018

    @JakubPawlak

    Unfortunately, it hasn't been fixed. This is the simple Playground to show the case: https://play.nativescript.org/?template=play-ng&id=CBt1Ou
    The problem appears when the is wrapped in any layout.

  10. b4rtt commented on Nov 24, 2018

    @b4rtt

    Same problem here.

    First screenshot is with flat=false and second one is with flat=true...

    https://imgur.com/a/OhMtRGT

  11. marcelomiranda90 commented on Dec 13, 2018

    @marcelomiranda90

    +1

  12. demetrio812 commented on Feb 3, 2019

    @demetrio812

    I can confirm I can reproduce the problem (using the latest version)

  13. yoat commented on Feb 15, 2019

    @yoat

    Try again with NativeScript 5.2. The issue I had (gap below flat ActionBar) has been resolved, so some work has gone into the NS 5.2 flat Action Bar handling.

  14. MartoYankov commented on Feb 18, 2019

    @MartoYankov
    Contributor

    As stated above, this issue is fixed in 5.2 with #6862

  15. ghost removed on Feb 18, 2019
  16. harryt04 commented on Mar 25, 2019

    @harryt04

    Can comfirm this is still not fixed. I'm on v5.3.0-rc-2019-03-22-063928-01

  17. MartoYankov commented on Mar 26, 2019

    @MartoYankov
    Contributor

    @harryt04 Can you try it with v5.2.1

  18. harryt04 commented on Mar 26, 2019

    @harryt04

    @MartoYankov I've tried it with v5.2.1, 5.2.2 and the most recent release candidate. The issue persists. For us, we have a stacklayout wrapping our page-router-outlet. I saw on another issue thread someone saying that they had the same use case and issue, although I can't seem to find that thread now.

    For now, our team has decided to change the action bar flat="false", and change our styling such that we aren't bothered by the non flat action bar. The only time the page doesn't lay out correctly is when the action bar flatness is set to true.

  19. MartoYankov commented on Mar 27, 2019

    @MartoYankov
    Contributor

    @harryt04 Flat bars have been a nightmare. However, this issue has been fixed in 5.2.1 and we have found out that it returned with 5.2.2. Here is the new issue that was opened - #7065. If this is not the issue you are experiencing, please open a new one. If you can attach a playground with a simple example that demonstrates your setup, it would be great.

  20. lock commented on Mar 27, 2020

    @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.

  21. locked and limited conversation to collaborators on Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions