コード例 #1
0
  private void setupThankYouState() {
    setViewsVisibility(mCommonSurveyViews, false);
    setViewsVisibility(mFeedbackViews, false);
    setViewsVisibility(mNpsViews, false);

    mThankYouLayout.setVisibility(VISIBLE);
    mThankYouLayout.initValues(mSettings, mRatingBar.getSelectedScore(), getFeedback());
  }
コード例 #2
0
  private void setupNpsState() {
    setViewsVisibility(mCommonSurveyViews, true);
    setViewsVisibility(mFeedbackViews, false);
    setViewsVisibility(mNpsViews, true);

    mTvSurveyHeader.setText(mSettings.getNpsQuestion());
    mThankYouLayout.setVisibility(GONE);
    setKeyboardVisibility(false);

    final boolean isScoreSelected = mRatingBar.isScoreSelected();
    updateSubmitBtn(isScoreSelected);
  }
コード例 #3
0
  private void setupFeedbackState() {
    setViewsVisibility(mCommonSurveyViews, true);
    setViewsVisibility(mFeedbackViews, true);
    setViewsVisibility(mNpsViews, false);

    int currentScore = mRatingBar.getSelectedScore();
    mTvSurveyHeader.setText(mSettings.getFollowupQuestion(currentScore));
    mEtFeedback.setHint(mSettings.getFollowupPlaceholder(currentScore));

    mThankYouLayout.setVisibility(GONE);
    setKeyboardVisibility(true);

    final boolean hasFeedback = !mEtFeedback.getText().toString().isEmpty();
    updateSubmitBtn(hasFeedback);
  }