private static SwipeBack createSwipeBack ( Activity activity , int dragMode , Position position , Type type , SwipeBackTransformer transformer ) { SwipeBack drawerHelper ; if ( type == Type . OVERLAY ) { drawerHelper = new OverlaySwipeBack ( activity , dragMode ) ; } else { drawerHelper = new SlidingSwipeBack ( activity , dragMode ) ; } final SwipeBack drawer = drawerHelper ; drawer . mDragMode = dragMode ; drawer . setPosition ( position ) ; drawer . mSwipeBackTransformer = transformer ; drawer . initSwipeListener ( ) ; return drawer ; }
Constructs the appropriate SwipeBack based on the position .