Guest User

Untitled

a guest
Jan 13th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. override fun onCreate(savedInstanceState: Bundle?) {
  2. super.onCreate(savedInstanceState)
  3.  
  4. val iFinish = getIntent()
  5. val numbers: String = iFinish.getStringExtra("LEVEL_NUMBER")
  6. val plays: String = iFinish.getStringExtra("NUMBER_PLAYS")
  7.  
  8. textViewNumPlays.text = plays
  9. textViewRandom.text = numbers
  10. }
  11.  
  12. fun onButtonRestartClicked (view: View){
  13. val message1 = numbers.toString()
  14. val iRestart = Intent(this, GameActivity::class.java).apply {
  15. putExtra("EXTRA_MESSAGE", message1);
  16. }
  17. if (iRestart.resolveActivity(packageManager) != null) {
  18. startActivity(iRestart)
  19. }
  20. }
Add Comment
Please, Sign In to add comment