Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

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 8 years ago
Jason Manns
Copied by Jason Manns over 8 years ago
14
0
1 2 3 4 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

0 comments

There are no comments, be the first and leave one below:

Similar

Biology AQA 3.1.2 Proteins
evie.daines
Of Mice and Men Quotes
_Jess_
GCSE AQA Biology - Unit 2
James Jolliffe
GCSE AQA Biology 1 Adaptations, Competition & Environmental Change
Lilac Potato
IB Biology Topic 4 Genetics (SL)
R S
GCSE AQA Biology 2 DNA & Cell Division
Lilac Potato
Biology Unit 1a - GCSE - AQA
RosettaStoneDecoded
GCSE REVISION TIMETABLE
holbbox
Using GoConqr to study Economics
Sarah Egan
Examen nefrologie partea 1
Dan Croitoru