@Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // On non-tablet devices, we lock the screen to portrait mode.
    boolean isTablet = getResources().getBoolean(R.bool.isTablet);
    if (isTablet) {
      setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER);
    } else {
      setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT);
    }

    setContentView(R.layout.howitworks);

    if (savedInstanceState != null) {
      onFirstOnboardingExperience = savedInstanceState.getBoolean(KEY_FIRST_ONBOARDING_EXPERIENCE);
    } else {
      Intent intent = getIntent();
      onFirstOnboardingExperience =
          intent != null && intent.getBooleanExtra(KEY_FIRST_ONBOARDING_EXPERIENCE, false);
    }

    pager = (ViewPager) findViewById(R.id.howitworks_pager);
    pager.setAdapter(new HowItWorksPagerAdapter(getSupportFragmentManager()));
    pager.addOnPageChangeListener(onPageChangeListener);
    PagingIndicator pagingIndicator = (PagingIndicator) findViewById(R.id.paging_indicator);
    pagingIndicator.setViewPager(pager);

    buttonSkip = (Button) findViewById(R.id.howitworks_button_skip);
    buttonSkip.setOnClickListener(view -> finishHowItWorksActivitiy());
    buttonSkip.setVisibility(View.VISIBLE);

    buttonNext = (ImageButton) findViewById(R.id.howitworks_button_next);
    buttonNext.setOnClickListener(
        v -> {
          int currentItem = getViewPagerCurrentItem();
          pager.setCurrentItem(currentItem + 1, true);
        });
    buttonNext.setVisibility(View.VISIBLE);

    buttonDone = (Button) findViewById(R.id.howitworks_button_done);
    buttonDone.setOnClickListener(view -> finishHowItWorksActivitiy());
    buttonDone.setVisibility(View.GONE);
  }
Whether we are in a very first onboarding experience or not.
java/com/google/android/apps/authenticator/howitworks/HowItWorksActivity.java