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

Jekyll and Hyde
elliesussex
Glossary of Accounting Terms
racheloucks
KEE2
harrym
Mumbai: Case study of Urbanisation
Hannah Burnett
Carbohydrates
anna.mat1997
Veterinary Nursing Instruments
rowan.bray
atoms and elements
Danoa400
Rights and Responsibilities Flashcards - Edexcel GCSE Religious Studies Unit 8
nicolalennon12
Biology (B2)
Sian Griffiths
'Love and Relationships' Poem Themes
Lindis Dixon
2PR101 1.test - 9. část
Nikola Truong