示例#1
0
  private void initializeTextViews() {
    textViewQuestion = (TextView) findViewById(R.id.textViewQuestion);

    textViewNumberOfQuestionsLeft = (TextView) findViewById(R.id.textViewNumberOfQuestionsLeft);
    textViewQuestionLevel = (TextView) findViewById(R.id.textViewQuestionLevel);
    textViewLivesLeftValue = (TextView) findViewById(R.id.textViewLivesLeftValue);
    textViewTimesPlayedTitle = (TextView) findViewById(R.id.textViewTimesPlayedTitle);
    textViewGameScoreText = (TextView) findViewById(R.id.textViewGameScoreText);
    textViewHowManyTimesQuestionsBeenAsked =
        (TextView) findViewById(R.id.textViewHowManyTimesQuestionsBeenAsked);

    textSwitcherTime = (TextSwitcher) findViewById(R.id.textViewTime);

    textSwitcherTime.setFactory(this);

    Animation inAnimation = AnimationUtils.loadAnimation(this, android.R.anim.fade_in);
    Animation outAnimation = AnimationUtils.loadAnimation(this, android.R.anim.fade_out);

    textSwitcherTime.setInAnimation(inAnimation);
    textSwitcherTime.setOutAnimation(outAnimation);
  }
示例#2
0
 @Override
 public void onQuestionTimeFinished() {
   checkAnswer(-1, null);
   textSwitcherTime.setText("0");
 }
示例#3
0
 @Override
 public void onQuestionUpdateTime(String newTime) {
   textSwitcherTime.setText(newTime);
 }