(cheerful music)
Alright, so it's time to start
creating an app that does a little bit more
than just displaying some text on the screen.
So in this section, we're gonna create
a Button Click app to show how to get a button
on the screen to perform some operation when it's clicked.
Now we're going to use this relatively simple example
to have a look at quite a few important concepts.
And we're actually gonna cover, firstly,
the Constraint Layout and this was introduced
in Android Studio 2.2 and it's much more efficient
than the previous approach of having to
nest layouts to create your app's screens.
Now, although it was introduced
when Nougat was released, Android N,
Google have made sure that it's compatible
with all API levels way back to Gingerbread,
and that's API 9.
Secondly, we're going to look at views.
Now, every widget you place on the screen
is actually a View in Android
and widgets, by the way, are the various components
that make up a useful Android screen.
Things like buttons, text boxes, sliders,
they're all views.
Now, it's possibly a strange use of the word view,
but that's what Android calls them.
Third, we're going to look at Android events.
Now, when we want a button to do something,
we have to write code that responds to an event.
Now, in this case the event is the user
tapping the button, so we'll see how that's done.
We're also gonna look at writing code in Android Studio.
Now, we can't do much at all without creating some code,
so this section will introduce writing
Kotlin code in Android Studio.
We're also gonna look at Activities,
as well as the Activity Lifecycle.
Now, Activities are an important concept in Android
so I'm gonna be explaining what they are
and discussing their lifecycle when an app is running.
You'll also see that Android destroys your screens
when you do something like rotating
the phone from Portrait into Landscape.
It stops your code and completely removes
the entire Activity from memory.
Now, that sounds a bit drastic,
but we'll be looking at how Android
allows us to cope with that situation
and it happens when you use most apps
and it isn't something that users are generally aware of.
Alright, we're gonna start by showing
now how to use the designer in Android Studio
to create the screens for our app.
And we'll have a play with it to get used
to how it works and what we can do with it.
So let's get started on that in the next video.