public void add ( final View view , final ViewGroup parent , int index ) { if ( view . getParent ( ) == null ) { view . setAlpha ( 0 ) ; parent . addView ( view , index ) ; if ( durationSet ) { view . animate ( ) . setDuration ( duration ) ; } view . animate ( ) . alpha ( 1 ) ; } }
Adds a view to the specified parent at the specified index in the parent s child list and then fades in the view . The view must not currently be parented - if its parent is not null the method returns without doing anything .