Advertisement
Guest User

Untitled

a guest
May 20th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.62 KB | None | 0 0
  1. package com.example.colorgame20;
  2.  
  3. import android.content.Context;
  4. import android.content.Intent;
  5. import android.os.Bundle;
  6. import android.os.CountDownTimer;
  7. import android.support.v7.app.AlertDialog;
  8. import android.support.v7.app.AppCompatActivity;
  9. import android.util.Log;
  10. import android.view.Gravity;
  11. import android.view.View;
  12. import android.widget.Button;
  13. import android.widget.GridLayout;
  14. import android.widget.ImageView;
  15. import android.widget.LinearLayout;
  16. import android.widget.TextView;
  17. import android.widget.Toast;
  18.  
  19. import java.util.ArrayList;
  20. import java.util.List;
  21.  
  22.  
  23. public class GameActivity extends AppCompatActivity{
  24.  
  25.     AlertDialog.Builder ad;
  26.     Context context;
  27.  
  28.     static final ArrayList<Integer> BUTTON_IDS = new ArrayList<>();
  29.  
  30.     @Override
  31.     protected void onCreate(Bundle savedInstanceState) {
  32.         super.onCreate(savedInstanceState);
  33.  
  34.         setContentView(R.layout.game_activity);
  35.  
  36.         final TextView timer = (TextView)findViewById(R.id.textView);
  37.  
  38.  
  39.         Buttons buttonField = new Buttons(context);
  40.         buttonField.createButtonsField();
  41.  
  42.         /*
  43.         FirstGameplay firstGameplay = new FirstGameplay();
  44.         firstGameplay.context = this;
  45.         firstGameplay.main();
  46.         if (firstGameplay.correctnessCheck()) {
  47.  
  48.             Levels.levelNumber++;
  49.  
  50.         }
  51. */
  52.  
  53.              new CountDownTimer(10000, 500) {
  54.  
  55.             public void onTick(long millisUntilFinished) {
  56.  
  57.                 timer.setText("00 : " + millisUntilFinished / 1000);
  58.             }
  59.  
  60.             public void onFinish() {
  61.  
  62.             }
  63.  
  64.         }.start();
  65.     }
  66.  
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement