From 484b97d888fef53b2832ebd4b98fe3864217ece9 Mon Sep 17 00:00:00 2001 From: Raffaele Date: Fri, 3 Apr 2015 23:32:34 +0200 Subject: [PATCH] Aggiunto TODO e sistemata score page --- .../com/example/raffaele/testapp/Score_page.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/example/raffaele/testapp/Score_page.java b/app/src/main/java/com/example/raffaele/testapp/Score_page.java index 7f22591..aa4d91a 100644 --- a/app/src/main/java/com/example/raffaele/testapp/Score_page.java +++ b/app/src/main/java/com/example/raffaele/testapp/Score_page.java @@ -16,13 +16,15 @@ protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.activity_score_page); Intent i = getIntent(); Bundle extras=i.getExtras(); - this.correct = extras.getParcelable("Correct"); - this.wrong=extras.getParcelable("Wrong"); - //imposto valori di nome,cognome e scuola in view - ((TextView)findViewById(R.id.CorrectC)).setText(correct.StringValue()); - ((TextView)findViewById(R.id.WrongC)).setText(wrong.StringValue()); - ((TextView) findViewById(R.id.AnsweredC)).setText(correct.StringValue()); - + if(this.correct!=null || this.correct!=null) { + //TODO: Qui si dovrebbe inserire il getscore totale se il campo passato non รจ null (ciru ce pienz tu :) ) + this.correct = extras.getParcelable("Correct"); + this.wrong = extras.getParcelable("Wrong"); + //imposto valori di nome,cognome e scuola in view + ((TextView) findViewById(R.id.CorrectC)).setText(correct.StringValue()); + ((TextView) findViewById(R.id.WrongC)).setText(wrong.StringValue()); + ((TextView) findViewById(R.id.AnsweredC)).setText(correct.StringValue()); + } }