Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- timer.cancel()
- alert.setPositiveButton("YES", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- Toast.makeText(getApplicationContext(),"Game is restarted",Toast.LENGTH_SHORT).show();
- Intent intent= getIntent();
- finish();
- startActivity(intent);
- }
- });
- alert.setNegativeButton("NO",new DialogInterface.OnClickListener(){
- @Override
- public void onClick(DialogInterface dialog, int which) {
- Toast.makeText(getApplicationContext(),"Process cancelled",Toast.LENGTH_SHORT).show();
- if(timeText.getText().toString().equals("Time's done !")){
- disableImages(false);
- timer.cancel();
- }
- else{
- activateImages(true);
- resumeTimer();
- }
- }
- });
- alert.setCancelable(false);
- alert.show();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement