In this video, Doug Winnie explains how to use XML to declare app layout using tags. Android widgets can be declared using XML tags, with attributes of widgets like ID, color, and other properties declared using XML. You can then link your XML-based widgets with code in Java to get the two sides to work with each other.
- [Instructor] To design the layout…and the buttons and controls of your app,…you will use a language called XML.…XML is a structured language that stands…for Extensible Markup Language.…It is the language that creates structure for your content…that you will display in your app.…If you're familiar with HTML,…you have worked with a structured language.…Using a structured language, you're able to define an order…to the things using tags you want to put on the screen.…And define certain attributes and properties of them.…Take for example a simple button.…With the button there is code in the XML language…that says, "Hey, there's a button here."…That is called a tag.…
That tag can contain all kinds of things inside of it.…For instance, I can give the button a name, called an id.…So in my code, I can talk to the button using the id.…I can also put text in the button.…I can give the button a different color.…I can also say that the app needs to do something…within a section of code when a user interacts with a button…
- Installing Android Studio
- Coding in Java and XML
- Getting a head start with starter templates
- Working with emulators
- Creating a project, variable, and toast
- Connecting XML widgets to code
- Adding images
- Adding game logic with conditional statements and operators
- Changing the data or design
Skill Level Beginner
1. Android Basics
Test your setup2m 56s
3. The Major Parts
4. Make an App
5. Tinkering with Your App
Next steps1m 4s
- 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.