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

Of Mice and Men
amyk4321
Physics
Holly Bamford
Key Biology Definitions/Terms
jane zulu
Physics 2
Peter Hoskins
AN ECONOMIC OVERVIEW OF IRELAND AND THE WORLD 2015/16
John O'Driscoll
Highway Code Road Signs for Driving Test
Sarah Egan
The Circulatory System
Johnny Hammer
SFDC App Builder 1 (26-50)
Connie Woolard
Část 2.
Gábi Krsková