Skip to content

Instantly share code, notes, and snippets.

View smihajlovski's full-sized avatar

Stefan Mihajlovski smihajlovski

  • Skopje, Macedonia
View GitHub Profile
public class MainActivity extends AppCompatActivity implements FragmentInteractionCallback {
private Map<String, Stack<Fragment>> stacks;
private String currentTab;
private ActivityMainBinding binder;
private List<String> stackList;
private List<String> menuStacks;
private Fragment currentFragment;
private Fragment homeFragment;
private Fragment dashboardFragment;
public class FragmentUtils {
/*
* Add the initial fragment, in most cases the first tab in BottomNavigationView
*/
public static void addInitialTabFragment(FragmentManager fragmentManager,
Map<String, Stack<Fragment>> stacks,
String tag,
Fragment fragment,
int layoutId,
public class MainActivity extends AppCompatActivity implements FragmentInteractionCallback {
private Map<String, Stack<String>> tagStacks;
private String currentTab;
private ActivityMainBinding binder;
private List<String> stackList;
private List<String> menuStacks;
private Fragment currentFragment;
private Fragment homeFragment;
private Fragment dashboardFragment;