-
Notifications
You must be signed in to change notification settings - Fork 262
Swipe edge to exit
JingYeoh edited this page Aug 3, 2018
·
1 revision
Swipe edge to exit support for
Activity/Fragment, the supported feature is below.
- Support multi-edge to exit (top/left/right/bottom)
- Option to config scrim
- Option to config shadow
- Option to config parallax
- Support multi-Fragment
- Support Activity
If you find the feature the
Swiperdoes not support , please post issue
Add
Swiperannotation onActivity/Fragment.
Note: Swiper Annotation can only used with Puppet.
@Swiper
@Puppet
public class TestFragment extends Fragment{
}
Swiperis support extend, the class can be swiped as the parent class is addedSwiperannotation.
Support
javacode andAnnotation params, thejavacode is
| return | function | default | describe |
|---|---|---|---|
| boolean | enable() | true | Allow or not to exit Activity/Fragment by swipe edge. |
| SwipeEdge[] | edgeSide() | SwipeEdge.LEFT | The edge that can be swiped. |
| float | parallaxOffset() | 1.0f | Allow or not to show the parallax effect. |
| int | scrimColor() | black | The scrim color as the view is swiping. |
| int | scrimMaxAlpha() | 128 | The scrim max alpha. |
| int[] | shadowDrawable() | 0 | The shadow drawable res for content view. |
| int | shadowWidth | 20 | The shadow width. |
You can set those params params by java code.
SwipeLayout swipeLayout = Rigger.getRigger(this).getSwipeLayout();
swipeLayout.setEnableSwipe();
// ...
- Installation
- Using start
- Fragment usage
- Custom fragment tag
- Lazy loading
- Transition animations
- Intercept onBackPressed
- startFragmentForResult
- Swipe edge to exit
- How to use in library module