diff --git a/apps/tests/ui/action-bar/action-bar-tests-common.ts b/apps/tests/ui/action-bar/action-bar-tests-common.ts index 1b7e44066..00bb42ba8 100644 --- a/apps/tests/ui/action-bar/action-bar-tests-common.ts +++ b/apps/tests/ui/action-bar/action-bar-tests-common.ts @@ -128,7 +128,7 @@ import actionBarModule = require("ui/action-bar"); // ... // //``` -//Setting `text` for the navigation button is not supproted in Android. You can use `icon` or `android.systemIcon` to set the image in Android. +//Setting `text` for the navigation button is not supported in Android. You can use `icon` or `android.systemIcon` to set the image in Android. //Setting `ios.systemIcon` for the navigation button is not supported in iOS. // // diff --git a/ui/frame/frame.android.ts b/ui/frame/frame.android.ts index 2ed763d60..7b2b8ba89 100644 --- a/ui/frame/frame.android.ts +++ b/ui/frame/frame.android.ts @@ -512,7 +512,7 @@ var NativeActivity = { // We take care of associating them with a Page from our backstack in the onAttachFragment callback. // If there is savedInstanceState and activityInitialized is false we are restarted but process was killed. // For now we treat it like first run (e.g. we are not passing savedInstanceState so no fragments are being restored). - // When we add support for applicatioin save/load state - revise this logic. + // When we add support for application save/load state - revise this logic. var isRestart = !!savedInstanceState && activityInitialized; this.super.onCreate(isRestart ? savedInstanceState : null); diff --git a/ui/styling/style.ts b/ui/styling/style.ts index 91c193277..715fac16e 100644 --- a/ui/styling/style.ts +++ b/ui/styling/style.ts @@ -174,23 +174,23 @@ function onLayoutParamsChanged(data: PropertyChangeData) { let marginBottomValue = convertToPercentHelper(style.marginBottom); // Negative marginPercent means no marginPercent so native layout won't override margin with this % value. - var layoutParams: definition.CommonLayoutParams = - { - width: width, - height: height, - widthPercent: widthPercent, - heightPercent: heightPercent, - leftMargin: marginLeftValue.isPercent ? 0 : marginLeftValue.value, - leftMarginPercent: marginLeftValue.isPercent ? marginLeftValue.value / 100 : -1, - topMargin: marginTopValue.isPercent ? 0 : marginTopValue.value, - topMarginPercent: marginTopValue.isPercent ? marginTopValue.value / 100 : -1, - rightMargin: marginRightValue.isPercent ? 0 : marginRightValue.value, - rightMarginPercent: marginRightValue.isPercent ? marginRightValue.value / 100 : -1, - bottomMargin: marginBottomValue.isPercent ? 0 : marginBottomValue.value, - bottomMarginPercent: marginBottomValue.isPercent ? marginBottomValue.value / 100 : -1, - horizontalAlignment: style.horizontalAlignment, - verticalAlignment: style.verticalAlignment - }; + var layoutParams: definition.CommonLayoutParams = + { + width: width, + height: height, + widthPercent: widthPercent, + heightPercent: heightPercent, + leftMargin: marginLeftValue.isPercent ? 0 : marginLeftValue.value, + leftMarginPercent: marginLeftValue.isPercent ? marginLeftValue.value / 100 : -1, + topMargin: marginTopValue.isPercent ? 0 : marginTopValue.value, + topMarginPercent: marginTopValue.isPercent ? marginTopValue.value / 100 : -1, + rightMargin: marginRightValue.isPercent ? 0 : marginRightValue.value, + rightMarginPercent: marginRightValue.isPercent ? marginRightValue.value / 100 : -1, + bottomMargin: marginBottomValue.isPercent ? 0 : marginBottomValue.value, + bottomMarginPercent: marginBottomValue.isPercent ? marginBottomValue.value / 100 : -1, + horizontalAlignment: style.horizontalAlignment, + verticalAlignment: style.verticalAlignment + }; style._setValue(nativeLayoutParamsProperty, layoutParams); } @@ -304,6 +304,8 @@ function onBackgroundImagePropertyChanged(data: PropertyChangeData) { style._setValue(backgroundInternalProperty, currentBackground.withImage(undefined)); imageSource.fromUrl(url).then((r) => { if (style && style["_url"] === url) { + // Get the current background again, as it might have changed while doing the request. + currentBackground = style._getValue(backgroundInternalProperty); style._setValue(backgroundInternalProperty, currentBackground.withImage(r)); } });