Exemplo n.º 1
0
 private void disableAnswerButtons() {
   //
   buttonAnswer1.setEnabled(false);
   buttonAnswer2.setEnabled(false);
   buttonAnswer3.setEnabled(false);
   buttonAnswer4.setEnabled(false);
 }
Exemplo n.º 2
0
 private void enableAnswerButtons() {
   //
   buttonAnswer1.setEnabled(true);
   buttonAnswer2.setEnabled(true);
   buttonAnswer3.setEnabled(true);
   buttonAnswer4.setEnabled(true);
 }
Exemplo n.º 3
0
  private void initializeQuestionTextViews(Question currentQuestion) {
    //
    mCurrentQuestion = currentQuestion;

    if (mReverseNumbersInQuestions) {
      textViewQuestion.setText(
          mStringParser.reverseNumbersInStringHebrew(
              mCurrentGame.getCurrentQuestion().getQuestion()));

      textViewTimesPlayedTitle.setText(
          mStringParser.reverseNumbersInStringHebrew(
              getString(R.string.textViewTimesPlayedTitleText)
                  + mCurrentGame.getCurrentQuestion().getQuestionTimesPlayed()));
    } else {
      textViewQuestion.setText(mCurrentGame.getCurrentQuestion().getQuestion());
      textViewTimesPlayedTitle.setText(
          getString(R.string.textViewTimesPlayedTitleText)
              + " "
              + mCurrentGame.getCurrentQuestion().getQuestionTimesPlayed());
    }
    // setting question difficulty
    textViewQuestionLevel.setText(mCurrentGame.getCurrentLevelAsString());

    textViewHowManyTimesQuestionsBeenAsked.setText(
        mCurrentGame.getHowManyTimesQuestionsBeenAsked());

    // randomize answer places (indices)
    mCurrentQuestion.randomizeAnswerPlaces(m_Random);

    buttonAnswer1.setText(mCurrentQuestion.getAnswer1());
    buttonAnswer2.setText(mCurrentQuestion.getAnswer2());
    buttonAnswer3.setText(mCurrentQuestion.getAnswer3());
    buttonAnswer4.setText(mCurrentQuestion.getAnswer4());
  }
Exemplo n.º 4
0
 private void resetAnswerButtonBackground(int blueButton) {
   //
   buttonAnswer1.setBackgroundResource(blueButton);
   buttonAnswer2.setBackgroundResource(blueButton);
   buttonAnswer3.setBackgroundResource(blueButton);
   buttonAnswer4.setBackgroundResource(blueButton);
 }
Exemplo n.º 5
0
  @Override
  protected void onResume() {
    //
    super.onResume();

    loadSoundPool();

    // checking if to show the report question button
    if (m_SharedPreferences.getBoolean("checkBoxPreferenceShowReportQuestion", true)) {

      buttonReportMistakeInQuestion.setVisibility(View.VISIBLE);
    } else {
      buttonReportMistakeInQuestion.setVisibility(View.GONE);
    }

    if (mResumeFromHelp) {
      mResumeClock = false;
      mResumeFromHelp = false;
    }

    if (mResumeClock) {}
  }
Exemplo n.º 6
0
  private void initializeButtons() {

    buttonAnswer1 = (Button) findViewById(R.id.buttonAnswer1);
    buttonAnswer2 = (Button) findViewById(R.id.buttonAnswer2);
    buttonAnswer3 = (Button) findViewById(R.id.buttonAnswer3);
    buttonAnswer4 = (Button) findViewById(R.id.buttonAnswer4);
    buttonPassQuestion = (Button) findViewById(R.id.buttonPassQuestion);

    buttonReportMistakeInQuestion = (Button) findViewById(R.id.buttonReportMistakeInQuestion);

    buttonAnswer1.setOnClickListener(this);
    buttonAnswer2.setOnClickListener(this);
    buttonAnswer3.setOnClickListener(this);
    buttonAnswer4.setOnClickListener(this);

    buttonReportMistakeInQuestion.setOnClickListener(this);
    buttonPassQuestion.setOnClickListener(this);
  }
Exemplo n.º 7
0
 private void setButtonGreen(Button o_Button) {
   o_Button.setBackgroundResource(R.drawable.green_button);
 }
Exemplo n.º 8
0
 private void setButtonRed(Button o_Button) {
   o_Button.setBackgroundResource(R.drawable.red_button);
 }