title: Add a timer and freeze app (android studio)
body: <p>im writing a quiz app on android studio, now, my goal is to add a time penalty for each wrong answer, means, if the user answered wrong he will have to wait lets say 10 sec' until he will be able to answer again, on those 10 sec', the app will freeze and the user will have to wait.</p>
  
  <p>i want to show the time remaining.</p>
  
  <p>the timer should be inserted in this part of the code:</p>
  
  <pre><code>    butNext.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              RadioGroup grp = (RadioGroup) findViewById(R.id.radioGroup1);
              RadioButton answer = (RadioButton) findViewById(grp.getCheckedRadioButtonId());
              Log.d("yourans", currentQ.getANSWER() + " " + answer.getText());
              if (currentQ.getANSWER().equals(answer.getText())) {//bad equal to
                  score++;
                  Log.d("good answer", "Your score" + score);
              }else {
                  Log.d("bad answer", "Your score" + score);
                 ***//the time should be implemented here***
              }
              if (qid &lt; 7) {
                  currentQ = quesList.get(qid);
                  setQuestionView();
              } else {
                  Intent intent = new Intent(Questionsctivity.this, ResultActivity.class);
                  Bundle b = new Bundle();
                  b.putInt("score", score); //Your score
                  intent.putExtras(b); //Put your score to your next Intent
                  startActivity(intent);
                  finish();
              }
          }
      });
  </code></pre>
  
  <p>thanks</p>