private static void attachToDecor ( Activity activity , SwipeBack swipeBack ) { ViewGroup decorView = ( ViewGroup ) activity . getWindow ( ) . getDecorView ( ) ; ViewGroup decorChild = ( ViewGroup ) decorView . getChildAt ( 0 ) ; decorView . removeAllViews ( ) ; decorView . addView ( swipeBack , LayoutParams . MATCH_PARENT , LayoutParams . MATCH_PARENT ) ; swipeBack . mContentContainer . addView ( decorChild , decorChild . getLayoutParams ( ) ) ; }
Attaches the swipe back drawer to the window .