mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
Merge pull request #1365 from NativeScript/page-background-color-android
Page background-color for Android fixed
This commit is contained in:
@ -153,17 +153,16 @@ export module ad {
|
|||||||
|
|
||||||
var backgroundValue = v.style._getValue(style.backgroundInternalProperty);
|
var backgroundValue = v.style._getValue(style.backgroundInternalProperty);
|
||||||
var borderWidth = v.borderWidth;
|
var borderWidth = v.borderWidth;
|
||||||
|
var bkg = <any>nativeView.getBackground();
|
||||||
|
|
||||||
if (v.borderWidth === 0 && v.borderRadius === 0 &&
|
if (!types.isNullOrUndefined(bkg) && v.borderWidth === 0 && v.borderRadius === 0 &&
|
||||||
!v.style._getValue(style.backgroundImageProperty) &&
|
!v.style._getValue(style.backgroundImageProperty) &&
|
||||||
v.style._getValue(style.backgroundColorProperty)) {
|
v.style._getValue(style.backgroundColorProperty)) {
|
||||||
let bkg = nativeView.getBackground();
|
|
||||||
if (bkg && bkg.setColorFilter) {
|
if (bkg && bkg.setColorFilter) {
|
||||||
bkg.setColorFilter(v.style._getValue(style.backgroundColorProperty).android, android.graphics.PorterDuff.Mode.SRC_IN);
|
bkg.setColorFilter(v.style._getValue(style.backgroundColorProperty).android, android.graphics.PorterDuff.Mode.SRC_IN);
|
||||||
}
|
}
|
||||||
} else if (v.borderWidth !== 0 || v.borderRadius !== 0 || !backgroundValue.isEmpty()) {
|
} else if (v.borderWidth !== 0 || v.borderRadius !== 0 || !backgroundValue.isEmpty()) {
|
||||||
|
|
||||||
let bkg = <any>nativeView.getBackground();
|
|
||||||
if (!(bkg instanceof dts.ad.BorderDrawable)) {
|
if (!(bkg instanceof dts.ad.BorderDrawable)) {
|
||||||
bkg = new dts.ad.BorderDrawable();
|
bkg = new dts.ad.BorderDrawable();
|
||||||
let viewClass = types.getClass(v);
|
let viewClass = types.getClass(v);
|
||||||
|
Reference in New Issue
Block a user