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

Quiz Geral
miminoma
Mind Maps Essay Template
linda_riches
SSAT Verbal Questions (Analogies)
philip.ellis
CPA Exam Topics and breakdown
joemontin
Main People in Medicine Through Time
Holly Bamford
Romeo and Juliet: Key Points
mbennett
Biology B2.1
Jade Allatt
Musical Terms
Abby B
GCSE AQA Biology 2 Respiration & Exercise
Lilac Potato
Prueba de Integrales
José William Montes Ocampo
TISSUE TYPES
Missi Shoup