From the course: Android Development Essential Training: The User Interface with Kotlin

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Load an XML layout file at runtime

Load an XML layout file at runtime - Android Tutorial

From the course: Android Development Essential Training: The User Interface with Kotlin

Start my 1-month free trial

Load an XML layout file at runtime

- [Instructor] This course is all about creating an Android app's visual appearance and behavior. And, the first place to start, is with XML layout files, which determine the initial appearance of your app's screens. Nearly every Android app uses an XML layout file to define the appearance of a screen. I'll describe how the XML file layout is loaded at run time as the application starts up, and I'll do this with a brand new project that I'll create from Android Studios' welcome screen. I'll start a new project, and I'll select one of these activity templates. The simplest of these, is called the Empty Activity. It creates a single XML layout file with just one little text view component that displays some read-only text. I want to work with something a little bit more complex than that, it's called the Basic Activity. It has a two-level layout, that is two different layout files, and it has a single material designed element, called a floating action button. On this screen, I'll give…

Contents