Help guys figure it out. My first test program.
There are two activites: MainActivity and MainActivityTwo. I turn between them like this:
Intent gotoanotheractivity = new Intent(MainActivity.this, MainActivityTwo.class); startActivity(gotoanotheractivity); And from the second to the first:
Intent gotoanotheractivity = new Intent(MainActivityTwo.this, MainActivity.class); startActivity(gotoanotheractivity); In MainActivityTwo I give the user a bonus - an asterisk for 12 correct questions. I keep it with
SharedPreferences and in the MainActivity (application menu) get out of the settings I bring it.
MainActivity:
if(mySettings1.contains(Tobe_Bonus_Star1)) { // получение 1 бонусной звездочки image_tobe1.setImageResource(R.drawable.star_gold); image_tobe1.setVisibility(View.VISIBLE); } Everything works, but when I finish the second activation with the finish () method, the bonuses are not displayed.
Tell me why?