Я столкнулся со слишком многими проблемами в этом проекте, я не собираюсь использовать эти данные, когда он закончится, он перейдет к HomeActivity
, а не DoneActivity
.
Подробности деятельности:
Intent intent = new Intent(this,DoneActivity.class);
Bundle dataSend = new Bundle();
dataSend.putInt("SCORE",score);
dataSend.putInt("TOTAL",totalQuestion);
dataSend.putInt("CORRECT",correctAnswer);
intent.putExtras(dataSend);
startActivity(intent);
finish();
DoneActivity:
Bundle extra = getIntent().getExtras();
if (extra != null){
int score = extra.getInt("SCORE");
int totalQuestion = extra.getInt("TOTAL");
int correctAnswer = extra.getInt("CORRECT");
txt_score.setText(String.format("SCORE : %d",score));
txt_get_question.setText(String.format("PASSED : %d / %d",correctAnswer,totalQuestion));
Как определить эти данные?
Вот ошибка:
![enter image description here](https://i.stack.imgur.com/h7vkl.png)