-
Notifications
You must be signed in to change notification settings - Fork 266
How to use in library module
JingYeoh edited this page Dec 18, 2017
·
1 revision
You can use annotation in
application
module
,butR
is not the final variables, so you can not pass parameter in some annotations such as@Puppet
and@Animator
.
This library operate support api for this.
@Puppet containerViewId
Add below method in your
Fragment/Activity
:
public int getContainerViewId(){
return R.id.container;
}
@Animator params
Add below method in your Fragment:
public int[] getPuppetAnimations(){
return new int[]{
R.anim.enter,R.anim.exit,R.anim.popEnter,R.anim.popExit
};
}
Notes: the method getPuppetAnimations
return value must be int array with four length, These four values correspond to the four parameters in the annotation, if you do not need the corresponding transition animation, set the value of the corresponding location to 0。
- 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