From 86b3699667d89077e38f7ebf60aaef867ff95b7e Mon Sep 17 00:00:00 2001 From: Yordan Banev Date: Tue, 10 Sep 2019 00:37:10 +0300 Subject: [PATCH] fix(android): fixes background color animation with borders (#11053) fixes animating a view's background color always starting from a wrong color --- .../java/org/appcelerator/titanium/util/TiAnimationBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationBuilder.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationBuilder.java index 2f1039fbc6c..932e2ed86e9 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationBuilder.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationBuilder.java @@ -337,7 +337,7 @@ private AnimatorSet buildPropertyAnimators(int x, int y, int w, int h, int paren // set backgroundColor on the child view and not TiBorderWrapperView itself bgView = ((TiBorderWrapperView) view).getChildAt(0); } - TiBackgroundColorWrapper bgWrap = TiBackgroundColorWrapper.wrap(view); + TiBackgroundColorWrapper bgWrap = TiBackgroundColorWrapper.wrap(bgView); int currentBackgroundColor = bgWrap.getBackgroundColor(); ObjectAnimator bgAnimator = ObjectAnimator.ofInt(bgView, "backgroundColor", currentBackgroundColor, backgroundColor);