How can I set a TAG for fragment that is created like this:
@Override
public Fragment getItem(int position) {
// getItem is called to instantiate the fragment for the given page.
// Return a PlaceholderFragment (defined as a static inner class below).
switch (position) {
case 0: return new scanFragment();
case 1: return new shopingListFragment();
case 2: return new PayOnlineFragment();
}
return new scanFragment();
}
I want to set a TAG to be able to communicate between fragments using interfaces.