Ohke, so I've updated to this:
final AlertDialog.Builder popup_timer = new AlertDialog.Builder(ScoreNewGame.this);
popup_timer.setTitle("Timer:\t90 sec between games");
CountDownTimer gameTimer = new CountDownTimer(9000, 1000)
{
@Override
public void onTick(long time_remaining)
{
popup_timer.setMessage("Time remaining:\t" + time_remaining);
}
@Override
public void onFinish()
{
}
};
gameTimer.start();
popup_timer.show();
But now I get the following error-
Failure getting entry for 0x010802c9 (t=7 e=713) in package 0 (error -75)
I searched around a bit but can't find any solution. Also, 0x010802c9 doesn't correspond to anything in R.java. The app doesn't crash though, the popup just doesn't display the countdowntimer like I want
I would suggest creating a dialog fragment instead. At that point you can handle the countdown timer in the fragment any which way you want.
Here's an example of a dialog fragment:
and here's how you would call it
I used a pretty simple layout for the fragment to to test it: