+
+ // If target Control has appearing transition, the target will not be rendered during delay.
+ // And if the Control has multiple transitions, the target will not be rendered during minimum delay of the transitions.
+ // Here we can find minimum delay of each target.
+ if(!transition->IsPairTransition() && transition->IsAppearingTransition())
+ {
+ bool found = false;
+ for(uint32_t index = 0; index < minimumDelays.size(); ++index)
+ {
+ if(minimumDelays[index].first == transition->GetTarget())
+ {
+ minimumDelays[index].second = std::min(minimumDelays[index].second, transition->GetTimePeriod().delaySeconds);
+ found = true;
+ break;
+ }
+ }
+ if(!found)
+ {
+ minimumDelays.push_back(std::pair<Dali::Actor, float>(transition->GetTarget(), transition->GetTimePeriod().delaySeconds));
+ }
+ }
+ }
+
+ // If the target has delay that is larger than 0, hide the target during minimum delay.
+ // The custom alpha function make the target hide just during delay.
+ for(auto&& delay : minimumDelays)
+ {
+ if(delay.second > Dali::Math::MACHINE_EPSILON_10)
+ {
+ Dali::KeyFrames initialKeyframes = Dali::KeyFrames::New();
+ initialKeyframes.Add(0.0f, OPACITY_TRANSPARENT);
+ initialKeyframes.Add(1.0f, delay.first.GetProperty<float>(Dali::Actor::Property::OPACITY));
+
+ AlphaFunction alpha(&CustomAlphaFunction);
+ mAnimation.AnimateBetween(Property(delay.first, Dali::Actor::Property::OPACITY), initialKeyframes, alpha, TimePeriod(delay.second));
+ }