package void onClick(View view) { clicks++; tclick.setText(“Clicks: “

package com.example.hamza.hamari_sawari;import android.os.CountDownTimer;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;import android.view.View;import android.widget.Button;import android.widget.ImageView;import android.widget.TextView;public class GameActivity extends AppCompatActivity { TextView ttime, tclick; Button brestart, bclick; CountDownTimer watch, stopwatch; int time =20; int clicks=0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_game); ttime=(TextView) findViewById(R.id.ttime); tclick=(TextView) findViewById(R.id.tclick); brestart=(Button) findViewById(R.id.brestart); bclick=(Button) findViewById(R.id.bclick); brestart.setEnabled(true); bclick.setEnabled(false); watch =new CountDownTimer(20000,1000) { @Override public void onTick(long l) { time–; ttime.setText(“Time: ” + time); } @Override public void onFinish() { brestart.setEnabled(true); bclick.setEnabled(false); ttime.setText(“Time: 0”); } }; bclick.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { clicks++; tclick.setText(“Clicks: ” + clicks); } }); brestart.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { watch.start(); brestart.setEnabled(false); bclick.setEnabled(true); clicks=0; time=20; ttime.setText(“Time: ” + time); tclick.setText(“Clicks: ” + clicks); } }); }}