private static void attachToContent ( Activity activity , SwipeBack swipeBack ) { /** * Do not call mActivity#setContentView. * E.g. if using with a ListActivity, Activity#setContentView is overridden and dispatched to * SwipeBack#setContentView, which then again would call Activity#setContentView. */ ViewGroup content = ( ViewGroup ) activity . findViewById ( android . R . id . content ) ; content . removeAllViews ( ) ; content . addView ( swipeBack , LayoutParams . MATCH_PARENT , LayoutParams . MATCH_PARENT ) ; }
Attaches the swipe back to the content view .