-
Notifications
You must be signed in to change notification settings - Fork 266
Custom fragment tag
JingYeoh edited this page Jan 26, 2018
·
4 revisions
Rigger
will create a unique tag for fragment when theFragment
constructor is called.But the rule isUUID+Class simple name
,so it's random.
This library support custom fragment tag.(Support version 1.1.0+)
Use below code to custom fragment tag,but you need use this method before add fragment to
FragmentTransaction
.
Fragment fragment = Fragment.newInstance();
Rigger.getRigger(fragment).setFragmentTag("Custom tag");
Add below code in your fragment
public String getFragmentTag(){
return "Custom Tag";
}
Note: Type one
priority over Type two
.
- 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