This course will be retired on July 14, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Build a Simple Android App with Kotlin!
You have completed Build a Simple Android App with Kotlin!
Preview
Before we start changing anything, let’s take a brief tour of our tools so we can get familiar with what’s on the screen and where we write code or make changes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
[MUSIC]
0:00
Before we start changing anything, let's
take a brief tour of our tools so we can
0:04
get familiar with what's on the screen and
where we write code or make changes.
0:08
The very first thing we want
to do is start our emulator.
0:14
You may already have it up and
running from the previous stage.
0:17
But if you don't, it's a good
idea to start it ahead of time so
0:20
it will be ready when you need it.
0:23
Up here in the toolbar
are a few Android buttons.
0:25
This one with the phone is our
Android Virtual Device Manager.
0:28
In here, just select the Virtual Device
that you want to run, and
0:33
click on the start button.
0:36
Once the Emulator window appears,
we can close this AVD Manager window.
0:39
We don't need to leave it
open to use the emulator.
0:45
All right, while that's loading,
let's take a look at Android Studio.
0:52
On the left-hand side there should
be a view for the project structure.
0:56
If it's missing, or you accidentally close
it, which you can do with this button
1:00
right here,
you can reopen it with the same button.
1:05
Or you can either go up to View
1:08
> Tool Windows > Project.
1:13
Or you can go down to the bottom, and as
we saw before, you can select Project or
1:18
other windows from here.
1:22
Also, remember that clicking on
this icon toggles whether or
1:25
not we see the Tool window
shortcuts around the screen.
1:28
The Project view is where we
can see all the files and
1:32
folders that make up our project.
1:35
By default, Android Studio displays our
project files in the Android Project view.
1:37
The Android Project view shows a
trimmed-down version of your project that
1:42
provides quick access to the most
important files for Android development.
1:46
Let's click here and
switch to the Project view.
1:51
This view shows our entire project.
1:55
Here was can see our
FunFacts folder at the top.
1:58
Let's expand that.
2:00
Also, notice that our FunFacts folder
is in our AndroidStudioProjects
2:03
folder that we used when we
first created the project.
2:07
In fact, if we switch to Finder or
Windows Explorer,
2:11
we can navigate to our project,
And sure enough,
2:15
we see that these files and folders
match up with what we see over here.
2:21
The most important folder in
our project is the app folder.
2:27
It contains all the resources and
raw materials that make up our app.
2:30
Let's take a look inside
to see how it's structured.
2:34
At the top is a build directory which
contains all the files that are built for
2:37
us by Android Studio.
2:41
We wouldn't ever need to change
anything in the build directory.
2:44
The next one is libs, and
that's short for libraries.
2:47
It contains any optional libraries of
code we might need in our project.
2:51
This will be empty for this project,
2:56
but we'll show more on how to
use libraries in later courses.
2:58
Next up here is SRC.
3:01
This is the most important directory,
and it's short for source.
3:04
Now I know source isn't that long of a
word, but programmers love abbreviations.
3:08
If we expand source,
we can see three more folders.
3:13
The androidTest and test folders
are used for different kinds of testing.
3:16
But let's save those for later.
3:22
We are more concerned
with the main folder.
3:24
Inside main are all the files
we'll be working with.
3:26
Java files are placed here in the java
folder, but don't let the name fool you.
3:29
This is also where we'll be
putting our Kotlin files.
3:34
Below java, we have res,
which is short for resources.
3:37
Resources are everything that we see or
hear in an app.
3:42
So in addition to images and sounds,
it also contains the layout files for
3:45
how our screens will be laid out.
3:50
If we keep going further, then inside
res we find the layout directory.
3:52
And in here is one file named
activity_fun_facts.xml.
3:57
This is the file that's
already opened over here.
4:02
That's enough about project structure.
4:06
Let's change back to the Android view so
4:08
we don't have to do as much
digging to find the files we want.
4:10
Great, now over here, this area is
the main section for writing code or
4:15
designing screen layouts.
4:20
We're currently looking at the Text view
for the activity_fun_facts layout file.
4:22
At the bottom, let's click on Design
to switch over to the Design view.
4:27
And I'll hide the Project pane for now.
4:32
The Design view is a drag and
4:36
drop editor that lets us visually
manipulate the screen layout.
4:37
In the middle is a preview of
how it should look on a device.
4:41
And it looks just like what we saw
a few minutes ago when we ran the app.
4:45
Also, next to the preview
is the Blueprint view,
4:49
which gives us some insight into what
our layout looks like behind the scenes.
4:51
When designing screen layouts, sometimes
we want to modify the code directly,
4:56
instead of using the Design view.
4:59
To modify the xml code, we just click
on the Text tab here at the bottom.
5:02
Unfortunately, the preview of our
app seems to have disappeared.
5:07
But don't worry, we can get it back by
clicking on this Preview button over here.
5:11
All right,
that should be enough to get us started.
5:16
In the next video,
we'll start making some changes.
5:18
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up