public void onProgramSelected(String programId, String programName) {
    mProgramButton.setText(programName);

    mState.setProgram(programId, programName);
    mPrefs.putProgram(new Pair<>(programId, programName));
    handleViews(1);

    mProgressBar.setVisibility(View.VISIBLE);
    // this call will trigger onCreateLoader method
    getLoaderManager().restartLoader(LOADER_ID, getArguments(), this);
  }
  public void onUnitSelected(String orgUnitId, String orgUnitLabel) {
    mOrgUnitButton.setText(orgUnitLabel);
    mProgramButton.setEnabled(true);

    mState.setOrgUnit(orgUnitId, orgUnitLabel);
    mState.resetProgram();

    mPrefs.putOrgUnit(new Pair<>(orgUnitId, orgUnitLabel));
    mPrefs.putProgram(null);

    handleViews(0);
  }