Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Android: ActionBar wrong background-color after back-navigation since 7.2.0 #9263

Closed
@felixkrautschuk

Description

@felixkrautschuk

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 7.2.0
  • Cross-platform modules: 7.3.0
  • Android Runtime: 7.0.1
  • iOS Runtime: -
  • XCode Version: -
  • Plugin(s): -

Describe the bug
When navigating from page A to page B and page B has an ActionBar with a different background-color than page A and the user navigates back from page A, the ActionBar of page A has now the background-color of page B until you navigate forwards to page A.

  • This is NOT happening on iOS
  • This was not happening with @nativescript/core 7.1.4 -> issue exists since 7.2.0, probably caused by Faster background color #9120

Not sure if it is related only to the ActionBar, but it is the only thing I noticed from our real app at least, the other widgets seem not to be affected.

<!-- page A -->
<Page>
    <ActionBar title="Main page" backgroundColor="CadetBlue" color="white"/>
</Page>
<!-- page B -->
<Page backgroundColor="black">
    <ActionBar title="Detail page" backgroundColor="black" color="white"/>
</Page>

ns-bg

To Reproduce
follow the steps from the GIF with the sample app provided below

Expected behavior
When navigating back to page A, the ActionBar should have the background-color defined in xml or css, not the background-color from the page B.

Sample project
NSAndroidBackgroundColorIssue.zip

Additional context
none

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions