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
1
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

Plant and animal cells
charlotteireland
Devices That Create Tension.
SamRowley
Realidad De Nuestra Identidad Cultural
53831
Computing Hardware - CPU and Memory
ollietablet123
The Cold War: An Overview
Andrea Leyden
med chem 2 final exam
lola_smily
The Weimar Republic, 1919-1929
shann.w
Periodic table - full deck of element symbols
Derek Cumberbatch
2PR101 1.test - 7. část
Nikola Truong
1PR101 2.test - Část 20.
Nikola Truong