From 700818dd28b7edd61d78bd01630e59eeaca30a8f Mon Sep 17 00:00:00 2001 From: Rossen Hristov Date: Thu, 10 Dec 2015 14:55:01 +0200 Subject: [PATCH] Resolved Issue #1223: Android views which have complex backgrounds (i.e. with rounded corners) cannot animate opacity. --- CrossPlatformModules.csproj | 11 +++++-- apps/animations/bkg.png | Bin 0 -> 311 bytes apps/animations/main-page.ts | 7 +++- apps/animations/main-page.xml | 1 + apps/animations/opacity.css | 27 +++++++++++++++ apps/animations/opacity.ts | 53 ++++++++++++++++++++++++++++++ apps/animations/opacity.xml | 35 ++++++++++++++++++++ apps/animations/test-icon.png | Bin 0 -> 1304 bytes tsconfig.json | 5 +-- ui/animation/animation.android.ts | 17 +++++++--- ui/styling/stylers.android.ts | 23 +++++++++++++ 11 files changed, 169 insertions(+), 10 deletions(-) create mode 100644 apps/animations/bkg.png create mode 100644 apps/animations/opacity.css create mode 100644 apps/animations/opacity.ts create mode 100644 apps/animations/opacity.xml create mode 100644 apps/animations/test-icon.png diff --git a/CrossPlatformModules.csproj b/CrossPlatformModules.csproj index b1df7e578..72a63583b 100644 --- a/CrossPlatformModules.csproj +++ b/CrossPlatformModules.csproj @@ -79,6 +79,7 @@ data-binding.xml + modal-page.xml @@ -117,6 +118,12 @@ + + + Designer + + + Designer @@ -2104,7 +2111,7 @@ False - + - + \ No newline at end of file diff --git a/apps/animations/bkg.png b/apps/animations/bkg.png new file mode 100644 index 0000000000000000000000000000000000000000..fa059ba75757ee3886a8fa6b4ad4e7cba46142f1 GIT binary patch literal 311 zcmeAS@N?(olHy`uVBq!ia0vp^Mj*_=1SBWM%0B~AjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL5ULAh?3y^w370~qEv>0#LT=By}Z;C1rt33 zJ=4@yqg0@p6`n4RArbCxuN!h5HV|n}WSzs8|MtR8yJG)K+`CR)II5aps(+OApt+>Z zKOV^*hAg&s3A{1cOz#Rdram~g?MDXZj>l^f&jnd{Kh$a6EP}!?%)hqeeE5;3D4`=o zj&}n3AM@?svf!@pl|x6>Zx!Atyk?ND>39B-z3HOeU%S`5dop?Ry*XQtM{=cW&RP0n r{Tji$YcFr!_gLrXnMh%~69W1>69hV1_WscYx|zY#)z4*}Q$iB}A7yx< literal 0 HcmV?d00001 diff --git a/apps/animations/main-page.ts b/apps/animations/main-page.ts index 40da5d9ac..1a63abb8f 100644 --- a/apps/animations/main-page.ts +++ b/apps/animations/main-page.ts @@ -6,6 +6,7 @@ import animationModule = require("ui/animation"); import colorModule = require("color"); import model = require("./model"); import enums = require("ui/enums"); +import frame = require("ui/frame"); var vm = new model.ViewModel(); @@ -162,4 +163,8 @@ export function onInterrupted(args: observable.EventData) { duration: 1000 }) }, 700 * 3); -} \ No newline at end of file +} + +export function onOpacity(args: observable.EventData) { + frame.topmost().navigate("./opacity"); +} diff --git a/apps/animations/main-page.xml b/apps/animations/main-page.xml index c6f0ad165..8b939ab70 100644 --- a/apps/animations/main-page.xml +++ b/apps/animations/main-page.xml @@ -18,6 +18,7 @@