+ KeyboardFocusManager::Get().FocusedActorEnterKeySignal().Connect( this, &DaliTableView::OnFocusedActorActivated );
+ AccessibilityManager::Get().FocusedActorActivatedSignal().Connect( this, &DaliTableView::OnFocusedActorActivated );
+
+ // Loop to create both actors for the focus highlight effect.
+ for( unsigned int i = 0; i < FOCUS_ANIMATION_ACTOR_NUMBER; ++i )
+ {
+ mFocusEffect[i].actor = ImageView::New( TILE_FOCUS );
+ mFocusEffect[i].actor.SetParentOrigin( ParentOrigin::CENTER );
+ mFocusEffect[i].actor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
+ mFocusEffect[i].actor.SetInheritScale( false );
+ mFocusEffect[i].actor.SetColorMode( USE_OWN_COLOR );
+
+ // Setup initial values pre-animation.
+ mFocusEffect[i].actor.SetScale( startScale );
+ mFocusEffect[i].actor.SetOpacity( 0.0f );
+
+ // Create and setup the animation to do the following:
+ // 1) Initial fade in over short period of time
+ // 2) Zoom in (larger) and fade out simultaneously over longer period of time.
+ mFocusEffect[i].animation = Animation::New( KEYBOARD_FOCUS_ANIMATION_DURATION );
+
+ mFocusEffect[i].animation.AnimateTo( Property( mFocusEffect[i].actor, Actor::Property::COLOR_ALPHA ), KEYBOARD_FOCUS_END_ALPHA, AlphaFunction::LINEAR, TimePeriod( 0.0f, initialFadeDuration ) );
+ mFocusEffect[i].animation.AnimateTo( Property( mFocusEffect[i].actor, Actor::Property::SCALE ), endScale, AlphaFunction::LINEAR, TimePeriod( initialFadeDuration, KEYBOARD_FOCUS_ANIMATION_DURATION - initialFadeDuration ) );
+ mFocusEffect[i].animation.AnimateTo( Property( mFocusEffect[i].actor, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunction::LINEAR, TimePeriod( initialFadeDuration, KEYBOARD_FOCUS_ANIMATION_DURATION - initialFadeDuration ) );
+
+ mFocusEffect[i].animation.SetLooping( true );
+ }
+
+ // Parent the secondary effect from the primary.
+ mFocusEffect[0].actor.Add( mFocusEffect[1].actor );
+
+ // Play the animation on the 1st glow object.
+ mFocusEffect[0].animation.Play();
+ // Stagger the animation on the 2st glow object half way through.
+ mFocusEffect[1].animation.PlayFrom( KEYBOARD_FOCUS_ANIMATION_DURATION / 2.0f );
+
+ KeyboardFocusManager::Get().SetFocusIndicatorActor( mFocusEffect[0].actor );