Exemplo n.º 1
0
  public static void goToFinalStage(Activity activity) {
    int levelId = AppManager.getInstance().getCurrentLevelId();
    Intent intent;
    System.gc();

    System.out.println("LEVEL ID " + levelId);

    switch (levelId) {
      case AppConstants.LEVEL_01:
        // intent = new Intent(activity, FinalStageOne.class);
        // activity.startActivityForResult(intent, 1);
        // break;
      case AppConstants.LEVEL_02:
      case AppConstants.LEVEL_03:
      case AppConstants.LEVEL_04:
        intent = new Intent(activity, FinalStageBase.class);
        activity.startActivityForResult(intent, 1);
        break;
      case AppConstants.LEVEL_05:
        intent = new Intent(activity, FinalStageSeven.class);
        activity.startActivityForResult(intent, 1);
        break;
      default:
        intent = null;
        break;
    }
  }
Exemplo n.º 2
0
  public static void goToNextStage(Context packageContext, Activity activity) {
    System.gc();
    StageInfo stageInf =
        StageConfigManager.getStageInfo(AppManager.getInstance().getCurrentStageID());

    Intent intent = new Intent(packageContext, CanvasDrawingActivity.class);
    intent.putExtra(MyView.SCREEN_SOLUTION_ID, stageInf.getSolutionPath());
    intent.putExtra(MyView.SCREEN_DRAW_ID, stageInf.getExcerciseView());
    intent.putExtra(MyView.SCREEN_BACKGROUND_ID, stageInf.getPaintingView());
    activity.finish();
    packageContext.startActivity(intent);
  }