Hello? It's Me (An Activity)

Week 1 · Lesson 5 · 10 minutes


We start discussing in depth the various components of our Android activity - what goes where, what does what, and see changes reflected in the emulator.

Each activity has a lifecycle - changes based on the user's interactions with the interface that create and destroy components. These components are defined within the Activity's Java file, which you can access via the directory on the right. 

android8

Some important things to keep in mind as you work: when you're dealing with specific functions there's a design and a text tab. The design tab shows you a GUI, a Graphical User Interface, which you can interact with if you prefer to make changes clicking and dragging and viewing things visually. 

android6 

The GUI a representation of the activity's XML files, and it's usually easier to simply work with the underlying code. 

android7

You can modify the look, feel, and behavior of your interface via the Java or the XML files. You'll get a little more nuance and a little bit more control over the elements from Java, though.