public class SlideSwipeBackTransformer extends java.lang.Object implements SwipeBackTransformer
| Modifier and Type | Field and Description |
|---|---|
protected android.view.View |
arrowBottom |
protected android.view.View |
arrowTop |
protected android.widget.TextView |
textView |
| Constructor and Description |
|---|
SlideSwipeBackTransformer() |
| Modifier and Type | Method and Description |
|---|---|
void |
onSwipeBackCompleted(SwipeBack swipeBack,
android.app.Activity activity)
This method is called after the swipe back has completed.
|
void |
onSwipeBackReseted(SwipeBack swipeBack,
android.app.Activity activity)
This method is called if the swipe back has been canceled / reseted.
|
void |
onSwipeBackViewCreated(SwipeBack swipeBack,
android.app.Activity activity,
android.view.View swipeBackView)
This is called if the swipe back view has been created.
|
void |
onSwiping(SwipeBack swipeBack,
float openRatio,
int pixelOffset)
Called while the swipe back view is opening or closing.
|
protected android.view.View arrowTop
protected android.view.View arrowBottom
protected android.widget.TextView textView
public void onSwipeBackViewCreated(SwipeBack swipeBack, android.app.Activity activity, android.view.View swipeBackView)
SwipeBackTransformerView.findViewById(int) etc.onSwipeBackViewCreated in interface SwipeBackTransformerswipeBack - The reference to the SwipeBack objectactivity - Tha activity the swipe back is attached toswipeBackView - The view that has been inflated as swipe back viewpublic void onSwipeBackCompleted(SwipeBack swipeBack, android.app.Activity activity)
SwipeBackTransformerActivity.finish() and you may set the
activity animations by using
Activity.overridePendingTransition(int, int). You
should use Activity.finish() and not
Activity.onBackPressed(), because onBackPressed()
may cause a IllegalStateException if the user rotates the device
(screen rotation from landscape to portrait or vice versa), while the
SwipeBackView is fully open, but the user has not released yet the finger
(finger is still on the screen).onSwipeBackCompleted in interface SwipeBackTransformerswipeBack - The reference to the SwipeBack objectpublic void onSwipeBackReseted(SwipeBack swipeBack, android.app.Activity activity)
SwipeBackTransformer#onSwipeBackCompleted(android.app.Activity).onSwipeBackReseted in interface SwipeBackTransformerswipeBack - The reference to the SwipeBack objectactivity - Tha activity the swipe back is attached topublic void onSwiping(SwipeBack swipeBack, float openRatio, int pixelOffset)
SwipeBackTransformeronSwiping in interface SwipeBackTransformerswipeBack - The reference to the SwipeBack objectopenRatio - a value between 0 and 1 that indicates how much open (visible) the swiping view ispixelOffset - The number of pixels visible of the swipe back view