From 3cf3d7184e1fcd1ae3afe46f1dd40dbae8256788 Mon Sep 17 00:00:00 2001 From: vakrilov Date: Mon, 6 Jul 2015 16:17:03 +0300 Subject: [PATCH] Fixed: bug when caching native backgrounds --- ui/styling/stylers.android.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/styling/stylers.android.ts b/ui/styling/stylers.android.ts index 4ba7fdeca..511f53aec 100644 --- a/ui/styling/stylers.android.ts +++ b/ui/styling/stylers.android.ts @@ -29,7 +29,7 @@ function onBackgroundOrBorderPropertyChanged(v: view.View) { var bkg = nativeView.getBackground(); if (!(bkg instanceof background.ad.BorderDrawable)) { bkg = new background.ad.BorderDrawable(); - let viewClass = types.getClass(view); + let viewClass = types.getClass(v); if (!_defaultBackgrounds.has(viewClass)) { _defaultBackgrounds.set(viewClass, nativeView.getBackground()); } @@ -48,7 +48,7 @@ function onBackgroundOrBorderPropertyChanged(v: view.View) { } else { // reset the value with the default native value - let viewClass = types.getClass(view); + let viewClass = types.getClass(v); if (_defaultBackgrounds.has(viewClass)) { v.android.setBackgroundDrawable(_defaultBackgrounds.get(viewClass)); }