private void showQuestion(int paramInt) { Object localObject = getSurveyState(); List localList = ((UpdateDisplayState.DisplayState.SurveyState)localObject).getSurvey().getQuestions(); label56: int i; Survey.Question localQuestion; if ((paramInt == 0) || (localList.size() == 0)) { this.mPreviousButton.setEnabled(false); if (paramInt < localList.size() - 1) { break label181; } this.mNextButton.setEnabled(false); i = this.mCurrentQuestion; this.mCurrentQuestion = paramInt; localQuestion = (Survey.Question)localList.get(paramInt); localObject = ((UpdateDisplayState.DisplayState.SurveyState)localObject).getAnswers().get(Integer.valueOf(localQuestion.getId())); if (i >= paramInt) { break label192; } } for (;;) { try { this.mCardHolder.moveTo(localQuestion, (String)localObject, CardCarouselLayout.Direction.FORWARD); if (localList.size() <= 1) { break label234; } this.mProgressTextView.setText("" + (paramInt + 1) + " of " + localList.size()); return; } catch (CardCarouselLayout.UnrecognizedAnswerTypeException localUnrecognizedAnswerTypeException) { label181: label192: goToNextQuestion(); return; } this.mPreviousButton.setEnabled(true); break; this.mNextButton.setEnabled(true); break label56; if (i > paramInt) { this.mCardHolder.moveTo(localQuestion, (String)localObject, CardCarouselLayout.Direction.BACKWARD); } else { this.mCardHolder.replaceTo(localQuestion, (String)localObject); } } label234: this.mProgressTextView.setText(""); }
private void saveAnswer(Survey.Question paramQuestion, String paramString) { getSurveyState().getAnswers().put(Integer.valueOf(paramQuestion.getId()), paramString.toString()); }