You can share data with other apps on the same device by setting the intent object's action property and sending other important information. Learn about common action values and constants and how to send that action from one activity to another.
- [Narrator] When you load a new activity with an intent,…you can share data with the new activity…in a number of ways.…To demonstrate this,…I've rebuilt this application a bit.…The main activity is much simpler than before…in terms of code,…but in its content layout file, I'll jump to that file here,…I've added four buttons, each displaying an image.…These are using a particular kind of component…called an image button.…And you can see in the text,…that I'm referring to the image that I want to display…right down here in the source attribute.…
The first button has an ID and source of monster01,…the second of monster02, and so on.…When the user touches or clicks one of these buttons,…I want to jump to the detail activity,…and display the selected image full screen.…Now to respond to those clicks, or touches,…I'm going to refer to the ID of the button.…I'll start here in the main activities on create function,…and I'll choose monster01 from content main.…When I choose that ID, I'm automatically adding this input.…
- Installing Android Studio
- Creating your first Android Studio project
- Managing configuration files, including Gradle scripts
- Defining screens with activities
- Implementing designs in XML layouts
Skill Level Beginner
Android Studio Essential Trainingwith David Gassner2h 28m Beginner
Android P First Look for Developerswith David Gassner36m 30s Beginner
What you should know2m 10s
1. Android Development Fundamentals
2. Getting Started
3. Explore Android Projects
4. Android App Architecture
Next steps1m 10s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.