-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathScoreActivity_d.java
More file actions
40 lines (28 loc) · 1.01 KB
/
ScoreActivity_d.java
File metadata and controls
40 lines (28 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.example.myquiz;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class ScoreActivity extends AppCompatActivity {
private TextView score;
private Button done;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_score);
score = findViewById(R.id.sa_score);
done = findViewById(R.id.sa_done);
String score_str = getIntent().getStringExtra("SCORE");
score.setText(score_str);
done.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(ScoreActivity.this,MainActivity.class);
ScoreActivity.this.startActivity(intent);
ScoreActivity.this.finish();
}
});
}
}