Pass variable to a different activity

Description

User has deleted their subject information Flashcards on Pass variable to a different activity, created by Deleted user on 13/11/2016.
Deleted user
Flashcards by Deleted user, updated more than 1 year ago More Less
Jason Manns
Created by Jason Manns over 7 years ago
Jason Manns
Copied by Jason Manns over 7 years ago
0
0

Resource summary

Question Answer
Write the code to pass a username from one activity to another & display it in a toast. // sender Intent intent = new Intent(this, OtherActivity.class); intent.putExtra("username", "Bob"); startActivity(intent); // receiver String username = getIntent().getExtraString("username"); Toast.makeText(this, username, Toast.LENGTH_SHORT).show()
Show full summary Hide full summary

Similar

Geometry Theorems
PatrickNoonan
General Knowledge Quiz
PatrickNoonan
Of Mice and Men
becky_e
English Language Terms
ekimlauretta
B5 - Growth and Deveolopment
blairzy123
Of Mice & Men Themes - Key essay points
Lilac Potato
Roles of Education
Isobel Wagner
P1 quiz
I M Wilson
GCSE Geography - Causes of Climate Change
Beth Coiley
The Berlin Crisis
Alina A
Část 3.
Gábi Krsková