diff --git a/.travis.yml b/.travis.yml
index abfebd78c..e42ee5701 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -37,16 +37,17 @@ before_script:
- adb shell input keyevent 82 &
script:
- jdk_switcher use oraclejdk8
- - grunt default --verbose &&
- FULL_PACKAGE_VERSION=`node -e 'console.log(require("./bin/dist/tns-core-modules/package.json").version);'` &&
- (cd tns-platform-declarations && npm pack) &&
- wget -O ./nativescript.tgz "https://s3.amazonaws.com/nativescript-ci/build_result/nativescript.tgz" &&
- echo no | npm install -g nativescript.tgz --ignore-scripts > /dev/null && tns usage-reporting disable && tns error-reporting disable &&
- grunt buildOnlyTestsApp --verbose --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --runtimeVersion=$RUNTIMEVERSION --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false > /dev/null &&
- grunt runOnlyTestsApp --verbose --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false
+ - grunt default --verbose
+ - FULL_PACKAGE_VERSION=$(node build/version.js)
+ - (cd tns-platform-declarations && npm pack)
+ - wget -O ./nativescript.tgz "https://s3.amazonaws.com/nativescript-ci/build_result/nativescript.tgz"
+ - echo no | npm install -g nativescript.tgz --ignore-scripts
+ - tns usage-reporting disable && tns error-reporting disable
+ - grunt buildOnlyTestsApp --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --runtimeVersion=$RUNTIMEVERSION --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false
+ - grunt runOnlyTestsApp --verbose --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false
- node ./build/travis-scripts/check-testrun-broken.js
- - adb pull /storage/sdcard/Documents/test-results.xml &&
- mv test-results.xml ~/test-run-results$PACKAGE_VERSION.xml
+ - adb pull /storage/sdcard/Documents/test-results.xml
+ - mv test-results.xml ~/test-run-results$PACKAGE_VERSION.xml
before_deploy:
- mv bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz ../.deploymentpackage
- mv build ../
diff --git a/apps/app/ui-tests-app/page/page-status-bar-css.xml b/apps/app/ui-tests-app/page/page-status-bar-css.xml
index 7552c3b9c..e79655855 100644
--- a/apps/app/ui-tests-app/page/page-status-bar-css.xml
+++ b/apps/app/ui-tests-app/page/page-status-bar-css.xml
@@ -4,35 +4,42 @@
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/version.js b/build/version.js
new file mode 100644
index 000000000..d09a690ec
--- /dev/null
+++ b/build/version.js
@@ -0,0 +1,2 @@
+var fs = require("fs");
+console.log(JSON.parse(fs.readFileSync("./bin/dist/tns-core-modules/package.json")).version);
\ No newline at end of file
diff --git a/tns-core-modules/ui/action-bar/action-bar.android.ts b/tns-core-modules/ui/action-bar/action-bar.android.ts
index fe5d63943..8edf161eb 100644
--- a/tns-core-modules/ui/action-bar/action-bar.android.ts
+++ b/tns-core-modules/ui/action-bar/action-bar.android.ts
@@ -427,10 +427,34 @@ export class ActionBarStyler implements style.Styler {
(v._nativeView).setTitleTextColor(nativeValue);
}
+ // background-color
+ private static getBackgroundColorProperty(view: view.View): any {
+ let toolbar = view._nativeView;
+ return toolbar.getBackground();
+ }
+
+ private static setBackgroundColorProperty(v: view.View, newValue: any) {
+ var toolbar = (v._nativeView);
+ if (toolbar) {
+ toolbar.setBackgroundColor(newValue);
+ }
+ }
+
+ private static resetBackgroundColorProperty(v: view.View, nativeValue: any) {
+ var toolbar = (v._nativeView);
+ if (toolbar) {
+ toolbar.setBackgroundColor(nativeValue);
+ }
+ }
+
public static registerHandlers() {
style.registerHandler(style.colorProperty, new style.StylePropertyChangedHandler(
ActionBarStyler.setColorProperty,
ActionBarStyler.resetColorProperty), "ActionBar");
+ style.registerHandler(style.backgroundColorProperty, new style.StylePropertyChangedHandler(
+ ActionBarStyler.setBackgroundColorProperty,
+ ActionBarStyler.resetBackgroundColorProperty,
+ ActionBarStyler.getBackgroundColorProperty), "ActionBar");
}
}
diff --git a/tns-core-modules/ui/page/page.android.ts b/tns-core-modules/ui/page/page.android.ts
index f0cb5910e..a89d7ef19 100644
--- a/tns-core-modules/ui/page/page.android.ts
+++ b/tns-core-modules/ui/page/page.android.ts
@@ -243,15 +243,19 @@ export class PageStyler implements style.Styler {
// android-status-bar-background-property
private static setAndroidStatusBarBackgroundProperty(v: view.View, newValue: any) {
- let window = app.android.startActivity.getWindow();
- let nativeColor = new colorModule.Color(newValue).android;
- window.setStatusBarColor(nativeColor);
+ if (platform.device.sdkVersion >= "21") {
+ let window = app.android.startActivity.getWindow();
+ let nativeColor = new colorModule.Color(newValue).android;
+ window.setStatusBarColor(nativeColor);
+ }
}
private static resetAndroidStatusBarBackgroundProperty(v: view.View, nativeValue: any) {
- let window = app.android.startActivity.getWindow();
- let nativeColor = (nativeValue instanceof colorModule.Color) ? (nativeValue).android : new colorModule.Color(nativeValue).android;
- window.setStatusBarColor(nativeColor);
+ if (platform.device.sdkVersion >= "21") {
+ let window = app.android.startActivity.getWindow();
+ let nativeColor = (nativeValue instanceof colorModule.Color) ? (nativeValue).android : new colorModule.Color(nativeValue).android;
+ window.setStatusBarColor(nativeColor);
+ }
}
private static getAndroidStatusBarBackgroundProperty(v: view.View): any {