Class EntrantNavigationHelper

java.lang.Object
com.example.lottery.util.EntrantNavigationHelper

public final class EntrantNavigationHelper extends Object
Centralised helper that wires up the entrant bottom-navigation bar (layout_bottom_nav_entrant.xml) in every entrant screen.

Call setup(Activity, EntrantTab, String) from onCreate after setContentView. Admin-role extras are read from AdminRoleManager automatically.

  • Method Details

    • setup

      public static void setup(android.app.Activity activity, EntrantNavigationHelper.EntrantTab currentTab, String userId)
      Highlights the active tab and wires every tab's click listener.
      Parameters:
      activity - the hosting Activity
      currentTab - which tab this screen represents
      userId - the entrant's userId
    • setup

      public static void setup(android.app.Activity activity, EntrantNavigationHelper.EntrantTab currentTab, String userId, boolean finishOnNavigate)
      Highlights the active tab and wires every tab's click listener.
      Parameters:
      activity - the hosting Activity
      currentTab - which tab this screen represents
      userId - the entrant's userId
      finishOnNavigate - if true, calls finish() after starting the target Activity (use for detail screens)
    • disableNavigation

      public static void disableNavigation(android.app.Activity activity)
      Replaces all tab click listeners with no-ops. Call this after setup(android.app.Activity, com.example.lottery.util.EntrantNavigationHelper.EntrantTab, java.lang.String) when the user must complete their profile before navigating away.