public void setupToC(final Page page, Site site, boolean firstPage) {
    tocProgress.setVisibility(View.GONE);
    tocList.setVisibility(View.VISIBLE);

    headerView.setText(Html.fromHtml(page.getDisplayTitle()));
    headerView.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            scrollToSection(page.getSections().get(0));
            wasClicked = true;
            funnel.logClick(0, page.getTitle().getDisplayText());
            hide();
          }
        });

    tocList.setAdapter(new ToCAdapter(page), site.getLanguageCode());
    tocList.setOnItemClickListener(
        new AdapterView.OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            Section section = (Section) parent.getAdapter().getItem(position);
            scrollToSection(section);
            wasClicked = true;
            funnel.logClick(position, section.getHeading());
            hide();
          }
        });

    funnel =
        new ToCInteractionFunnel(
            WikipediaApp.getInstance(),
            site,
            page.getPageProperties().getPageId(),
            tocList.getAdapter().getCount());

    if (!page.isMainPage() && !firstPage) {
      if (WikipediaApp.getInstance().getOnboardingStateMachine().isTocTutorialEnabled()) {
        showTocOnboarding();
      }
    }
  }