Пример #1
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setHasOptionsMenu(true);
   mSkippedQuestions = new ArrayList<Question>();
   ArrayList<String> skippedQuestionsIds = new ArrayList<String>();
   skippedQuestionsIds =
       getActivity().getIntent().getExtras().getStringArrayList(EXTRA_REVIEW_QUESTION_IDS);
   mSurvey =
       Survey.load(
           Survey.class, getActivity().getIntent().getExtras().getLong(EXTRA_REVIEW_SURVEY_ID));
   for (String id : skippedQuestionsIds) {
     Question q = Question.findByQuestionIdentifier(id);
     if (q != null) {
       mSkippedQuestions.add(q);
     }
   }
   setListAdapter(new QuestionAdapter(mSkippedQuestions));
   getActivity().setTitle("Skipped Questions");
 }
Пример #2
0
 private void completeSurvey() {
   mSurvey.setAsComplete();
   mSurvey.save();
   setReturnResults(Long.MIN_VALUE);
   new SendResponsesTask(getActivity()).execute();
 }