code: private void initializeToolbar() {
          Condition.INSTANCE.ensureTrue(getSupportActionBar() == null,
                  "An action bar is already attached to the activity. Use the theme " +
                          "\"@style/Theme.MaterialComponents.NoActionBar\" or " +
                          "\"@style/Theme.MaterialComponents.Light.NoActionBar\" as the activity's theme",
                  IllegalStateException.class);
          if (isSplitScreen()) {
              toolbarLarge.setVisibility(View.VISIBLE);
          } else {
              toolbar.setVisibility(View.VISIBLE);
          }
  
          setSupportActionBar(toolbar);
          resetTitle();
      }
docs: Initializes the activity's toolbar.