Commit 82164848 authored by Buwaneka 's avatar Buwaneka

add ResultActivity.java

parent 850cb813
package com.example.count;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class ResultActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.final_score_layout);
TextView right = findViewById(R.id.rightscore);
TextView wrong = findViewById(R.id.wrongscore);
TextView finalCout = findViewById(R.id.finalScore);
right.setText(Integer.toString(GlobleVariable.RightGloble));
wrong.setText(Integer.toString(GlobleVariable.WrongGloble));
int scroe= GlobleVariable.RightGloble-GlobleVariable.WrongGloble;
finalCout.setText(Integer.toString(scroe));
Button btn = findViewById(R.id.tryagain);
Button chart = findViewById(R.id.showchart);
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(ResultActivity.this, TakeImage.class));
}
});
chart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(ResultActivity.this, ChartShow.class));
}
});
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment