From the course: Android Development Essential Training: Your First App with Kotlin
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Implement designs in XML layouts - Android Tutorial
From the course: Android Development Essential Training: Your First App with Kotlin
Implement designs in XML layouts
- [Instructor] When an activity first comes to the screen it loads it in XML layout file by calling the set content view function. The set content view function takes an integer value that's the resource ID of this file. This expression R.layout.activity.main references an integer value that's assigned automatically. And stored in a class named R. Now that class is auto-generated and you'll never make changes to it yourself. If you did find the class and change it, your changes would be wiped out automatically by a process that's running in the background as you code that's generating that class. The resource ID for a layout file always starts with R.layout. Layout references the layout directory in the resources directory and then ends with the name of the file without the file extension. Now you can jump to that file by pressing control or command and clicking the ID. And that'll take you to activitymain.xml. Over here in the project window, you can collapse all these directories…
Contents
-
-
-
-
-
-
(Locked)
Define screens with activities4m 2s
-
(Locked)
Implement designs in XML layouts3m 59s
-
(Locked)
Use the View and ViewGroup components3m 28s
-
(Locked)
Display an image in an activity4m 36s
-
Convert PNG and SVG image files3m 48s
-
(Locked)
Start new activities with intents4m 25s
-
(Locked)
Send an action to a new activity4m 32s
-
(Locked)
Send data URIs and extras with intents6m 50s
-
(Locked)
Handle shared data with an intent filter5m 39s
-
(Locked)
-