if(mActiveLayout->GetItemSize(itemId, targetSize, size))
{
// resize immediately
- actor.SetResizePolicy( FIXED, ALL_DIMENSIONS );
- actor.SetPreferredSize( size.GetVectorXY() );
+ actor.SetSize( size.GetVectorXY() );
}
mActiveLayout->ApplyConstraints(actor, itemId, durationSeconds, mScrollPositionObject, Self() );
Vector3 size;
if( mActiveLayout->GetItemSize( item.first, mActiveLayoutTargetSize, size ) )
{
- item.second.SetResizePolicy( FIXED, ALL_DIMENSIONS );
- item.second.SetPreferredSize( size.GetVectorXY() );
+ item.second.SetSize( size.GetVectorXY() );
}
mActiveLayout->ApplyConstraints( item.second, item.first, durationSeconds, mScrollPositionObject, Self() );
if(mOvershootAnimationSpeed > Math::MACHINE_EPSILON_0)
{
float currentOvershoot = mScrollPositionObject.GetProperty<float>(ScrollConnector::OVERSHOOT);
- float duration = mOvershootOverlay.GetCurrentSize().height * (animatingOn ? (1.0f - fabsf(currentOvershoot)) : fabsf(currentOvershoot)) / mOvershootAnimationSpeed;
+ float duration = 0.0f;
+
+ if (mOvershootOverlay)
+ {
+ duration = mOvershootOverlay.GetCurrentSize().height * (animatingOn ? (1.0f - fabsf(currentOvershoot)) : fabsf(currentOvershoot)) / mOvershootAnimationSpeed;
+ }
RemoveAnimation(mScrollOvershootAnimation);
mScrollOvershootAnimation = Animation::New(duration);