Skip to content

Instantly share code, notes, and snippets.

@codingwithsara
Created October 22, 2018 07:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codingwithsara/b7454caa04ba1f8e5e5e45771168f80a to your computer and use it in GitHub Desktop.
Save codingwithsara/b7454caa04ba1f8e5e5e45771168f80a to your computer and use it in GitHub Desktop.
7-4
// トータルスコアを保存
SharedPreferences.Editor editor = prefs.edit();
editor.putInt("totalScore", totalScore);
editor.apply();
}
public void returnTop(View view) {
Intent intent = new Intent(getApplicationContext(), MainActivity.class);
startActivity(intent);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment