fix: return default tab background color when the background color is not explicitely set through css (#8240)

* fix: return default tab background color

when the background color is not explicitely set through css

* chore: update NativeScript.api.md

* fix: do not cast return getTabBarBackgroundColor to ColorDrawable

* chore: added comment and method check

Co-authored-by: Alexander Vakrilov <alexander.vakrilov@gmail.com>
This commit is contained in:
Vasil Trifonov
2020-01-14 15:53:26 +02:00
committed by GitHub
parent 4e48e68924
commit 8569b51a9a
5 changed files with 17 additions and 6 deletions

View File

@ -578,9 +578,7 @@ export class BottomNavigation extends TabNavigationBase {
// BACKGROUND-COLOR
const backgroundColor = tabStripItem.style.backgroundColor;
if (backgroundColor) {
tabItemSpec.backgroundColor = backgroundColor.android;
}
tabItemSpec.backgroundColor = backgroundColor ? backgroundColor.android : this.getTabBarBackgroundArgbColor();
// COLOR
const color = titleLabel.style.color;