AbstractFragment
The abstractFragment is subClass from the fragment.
For use The abstractFragment must be extend fragment from this.
public class MainFragment extends AbstractFragment
getTagId
Return fragment identifier
getTagId();
setTagId
Set identifier for fragment
argument:
String tagId
fragment.setTagId("exampleTagId");
fragmentManager
Return instance of fragmentManager to do transactions
Note: To use, the activity must inherit from the abstractActivity
FragmentTransaction transaction = fragmentManager().beginTransaction();
actionFragment
ActionFragment has the function to change the fragment
argument:
int frameLayoutId
int type
boolean addToBackStack
fragment.actionFragment(R.id.frameLayout, AbstractFragment.TYPE_REPLACE, true);
removeFragmentPopBackStack
Remove the fragment from backstack
fragment.removeFragmentPopBackStack();
setInstantiate
Find instance of this fragment in backstack
If pass ‘true’ use exist fragment in backstack
Else pass ‘false’ use new instance
argument:
boolean instantiate
fragment.setInstantiate(true);