06-28-2012 09:10 AM
I've noticed that when I load new QML files, the images animate into place.
For example, if the screen contains an image at position X,Y and it is of width W and height H, then the image becomes visible at coordinates 0,0 and has width 0 and height 0, and then animates into place by flying over to coordinates X,Y and growing to eventually be of width W and height H.
If I then click the "Back" button and go to that QML screen a second time, it doesn't animate.
Is this implicit animation intended? While implicit animations are rather amazing and a great tool to have, it seems counter intuitive to have screens use implicit animations when they are first loaded. It creates a rather unpleasant business and visual distraction when the screen is loading.
I thought I could disable this by adding the following to the ImageView controls:
attachedObjects: [
ImplicitAnimationController {
enabled: false
}
]
... but they are still animating.
Thanks,
Daniel
Solved! Go to Solution.
06-28-2012 09:48 AM - edited 06-28-2012 09:49 AM
I've noticed the same thing yet mine appears to be very suttle. I like it, I think it gives my app just a little more life to it.
That being said, I have no idea how to disabled it....
07-04-2012 10:55 AM
Try specifying the property you want to disable as such:
attachedObjects: [
ImplicitAnimationController {
propertyName: "translationX"
enabled: false
}
]
Let me know if it works.
07-04-2012 01:39 PM
No, that doesn't appear to work... I tried:
attachedObjects: [
ImplicitAnimationController {
propertyName: "translationX"
enabled: false
},
ImplicitAnimationController {
propertyName: "translationY"
enabled: false
},
ImplicitAnimationController {
propertyName: "scaleX"
enabled: false
},
ImplicitAnimationController {
propertyName: "scaleY"
enabled: false
}
]
I also tried adding those attached objects to both the ImageView as well as its parent container.
07-06-2012 09:26 AM
07-10-2012 08:23 PM
Here's the code:
import bb.cascades 1.0
NavigationPane {
Page {
content: Container {
layout: StackLayout {
}
Container {
layout: DockLayout {
}
ImageView {
id: momImage
layoutProperties: DockLayoutProperties {
verticalAlignment: VerticalAlignment.Top
horizontalAlignment: HorizontalAlignment.Left
}
imageSource: "asset:///images/boys.png"
scalingMethod: ScalingMethod.AspectFill
bottomMargin: 0
topMargin: 0
attachedObjects: [
ImplicitAnimationController {
propertyName: "translationX"
enabled: false
},
ImplicitAnimationController {
propertyName: "translationY"
enabled: false
},
ImplicitAnimationController {
propertyName: "scaleX"
enabled: false
},
ImplicitAnimationController {
propertyName: "scaleY"
enabled: false
}
]
}
}
Container {
layout: DockLayout {
}
ImageView {
id: dadImage
layoutProperties: DockLayoutProperties {
verticalAlignment: VerticalAlignment.Top
horizontalAlignment: HorizontalAlignment.Left
}
imageSource: "asset:///images/girls.png"
scalingMethod: ScalingMethod.AspectFill
bottomMargin: 0
topMargin: 0
attachedObjects: [
ImplicitAnimationController {
propertyName: "translationX"
enabled: false
},
ImplicitAnimationController {
propertyName: "translationY"
enabled: false
},
ImplicitAnimationController {
propertyName: "scaleX"
enabled: false
},
ImplicitAnimationController {
propertyName: "scaleY"
enabled: false
}
]
}
}
}
}
}
And here are the images:
http://danielbigham.ca/boys.png
http://danielbigham.ca/girls.png
07-24-2012 10:35 AM
Have you tried disabling implicit animations for your components using the ImplicitAnimationController?
https://developer.blackberry.com/cascades/document
Martin
07-25-2012 09:09 PM
Did you notice the sample code above?
(yes)
This appears to be fixed with the most recent SDK.
12-02-2012 05:56 PM
Beta 4 has the same issue again (?). Nothing helps to disable the ImageView animation when a new image is set
For my app this implicit animation is extremely undesirable. Gosh, I wish we could have access to camera and invocation framework from Qt apps without using Cascades