-
Notifications
You must be signed in to change notification settings - Fork 266
Intercept onBackPressed
JingYeoh edited this page Dec 18, 2017
·
1 revision
Fragment remove operation from the stack in this library is worked by
onBackPressed
method,but sometimes we nedd intercept this method to do something.This library provides api for this.
Add a public method
onRiggerBackPressed
with no parameter.
@Puppet
public class TestFragment extent Fragment{
public void onRiggerBackPressed(){
//Rigger.getRigger(this).onBackPressed();
//if you nedd intercept onBackPressed method,do not write the above code.
}
}
If your class contains onRiggerBackPressed
method,then this method will be called as the host Activity#onBackPressed
is calling.If you need use the default operation of library, add Rigger.getRigger(this).onBackPressed()
to the method.
- 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