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

Accounting Definitions
Tess Morris
Physics Revision
Tom Mitchell
Nazi Germany Dates
Georgina.Smith
FREQUENCY TABLES: MODE, MEDIAN AND MEAN
Elliot O'Leary
Biology AS Level Vocab- OCR- Chapters 1 and 2
Laura Perry
USA and Vietnam (1964 - 1975) Part 2
Lewis Appleton-Jones
mcolby MITOSIS TEST
Melinda Colby
Structure of the League of Nations
saskiamitchell.19
Modals & semi-modals
Abeer Alqahtani
AQA Biology B2 Questions
Sian Griffiths
Organizadores Gráficos
Eunice Sabaján