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

    mSavedInstanceState = savedInstanceState;

    final Animation inAnimation = AnimationUtils.loadAnimation(this, android.R.anim.slide_in_left);
    inAnimation.setAnimationListener(mInAnimationListener);

    final Animation outAnimation = AnimationUtils.loadAnimation(this, android.R.anim.slide_in_left);

    mRepeatHandler = new RepeatHandler(this);

    mFeedbackController = new FeedbackController(this);

    mViewAnimator = new ViewAnimator(this);
    mViewAnimator.setInAnimation(inAnimation);
    mViewAnimator.setOutAnimation(outAnimation);
    mViewAnimator.addView(new TouchTutorialModule1(this));
    mViewAnimator.addView(new TouchTutorialModule2(this));
    mViewAnimator.addView(new TouchTutorialModule3(this));
    mViewAnimator.addView(new TouchTutorialModule4(this));

    // Module 5 (text editing) requires JellyBean MR2 (API 18) features.
    if (Build.VERSION.SDK_INT >= TouchTutorialModule5.MIN_API_LEVEL) {
      mViewAnimator.addView(new TouchTutorialModule5(this));
    }

    // Ensure the screen stays on and doesn't change orientation.
    final Window window = getWindow();
    final WindowManager.LayoutParams params = window.getAttributes();
    params.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;
    params.flags |= WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
    window.setAttributes(params);

    setContentView(mViewAnimator);

    mAccessibilityManager = (AccessibilityManager) getSystemService(ACCESSIBILITY_SERVICE);

    // Lock the screen orientation until the first instruction is read.
    lockOrientation();

    mFirstTimeResume = true;
  }
  private void setupInput() {
    inputSwitcher.setInAnimation(getAnimation(R.anim.alpha_in, true));
    inputSwitcher.setOutAnimation(getAnimation(R.anim.alpha_out, false));

    inputSwitcher.removeAllViews();
    for (int i = 0; i < steps.size(); i++) {
      inputSwitcher.addView(getStep(i).getView());
    }
  }
  private void setupInput() {
    mInputSwitcher.setInAnimation(getAnimation(R.anim.alpha_in, true));
    mInputSwitcher.setOutAnimation(getAnimation(R.anim.alpha_out, false));

    mInputSwitcher.removeAllViews();
    System.out.println("Step size = " + stepsSize());
    for (int i = 0; i < stepsSize(); i++) {
      System.out.println("Problem with " + i + "?");
      mInputSwitcher.addView(getStep(i).getView());
    }
  }