private void setActivatedOnViewGroup ( @ NonNull final ViewGroup viewGroup , final boolean activated ) { viewGroup . setActivated ( activated ) ; for ( int i = 0 ; i < viewGroup . getChildCount ( ) ; i ++ ) { View child = viewGroup . getChildAt ( i ) ; if ( child instanceof ViewGroup ) { setActivatedOnViewGroup ( ( ViewGroup ) child , activated ) ; } else { child . setActivated ( activated ) ; } } }
Adapts the activated state of all children of a specific view group .