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 about 8 years ago
Jason Manns
Copied by Jason Manns about 8 years ago
5
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

Cold War (1945-1975)
sagar.joban
SAT Math Sample Questions
SAT Prep Group
Waves
kate.siena
OCR Physics P2 revision cards
Alex Howard
AQA - English Language Unit 1
Alice Love
Pe - Principles of Training
Beccadf 1
F211- Module 1 Cells, exchange and transport
eilish.waite
GCSE REVISION TIMETABLE
megangeorgia03
Social Influence
olimcconnell
No more diets
dana othman
Clinical Pathoanatomy MCQs (Q 151-250)
Ore iyanda