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

Drama Works IB English
miss.bakare
B1 Biology
Emily Needham
Nazi Germany Dates
Georgina.Smith
OCR Physics P2 revision cards
Alex Howard
Geography Coasts Questions
becky_e
NCEA level 1 Genetics
Summery16
AQA AS Biology Unit 2 The Cell cycle
elliedee
Unit 1 flashcards
C R
GCSE Maths Symbols, Equations & Formulae
livvy_hurrell
Business Management Exam Review Quiz
emily_hill
Management 1. PT (3MA101) - 1. část
Vendula Tranová