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
9
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

An Inspector Calls: Characters
bexjrutherford
IB Bio - Mitosis Quiz
j. stu
GCSE AQA Biology - Unit 2
James Jolliffe
AQA AS Biology Unit 2 DNA and Meiosis
elliedee
GCSE Chemistry C1 (OCR)
Usman Rauf
Acids and Bases quiz
Derek Cumberbatch
Biology - B1 - AQA - GCSE - Keeping Healthy and Defending Against Infection
Josh Anderson
HEMORRAGIAS - OBST PATOLOGICA
María José Alvarez Gazzano
Core 1.5 Mechanisms
T Andrews
AAHI_Card set 3 (Vital sign parameters - Adult)
Tafe Teachers SB