예제 #1
0
  private void goToSection() {
    //        Intent sectionIntent = new Intent(this, SingleSheetActivity.class);
    Section sectionaux = Utils.getSectionByID(String.valueOf(value.getRef_sectionID()));
    Sheet sheetAux = Utils.getSheetByID(String.valueOf(sectionaux.getRef_SheetID()));

    Intent singlesheetIntent = new Intent(this, SingleSheetWithTabsActivity.class);
    String rootID = "";
    if (sheetAux != null) {
      rootID = sheetAux.getRef_UserID();
    }
    singlesheetIntent.putExtra("rootID", rootID);
    singlesheetIntent.putExtra("sheetID", String.valueOf(sectionaux.getRef_SheetID()));
    //        sectionIntent.putExtra("sheetID", String.valueOf(sectionaux.getRef_SheetID()));

    Intent home = new Intent(this, RootsActivity.class);
    home.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);

    TaskStackBuilder taskStackBuilder = TaskStackBuilder.create(this);
    taskStackBuilder.addNextIntent(home);
    taskStackBuilder.addNextIntent(singlesheetIntent);
    taskStackBuilder.startActivities();
    onBackPressed();
  }