All right, so in this video, we are going to set up our first project and we're going to look at the
user interface and, for example, also change the text size of the code that we have.
Okay, so the first thing that we see here is welcome to Android Studio, which is great, and then
we can create a new project to start from scratch or we can open existing projects.
So if you want to open, the project said, you will find as a downloadable file for lectures that you
have in the course.
And you can, of course, click on Open.
But we're going to start with a new project here.
So once you select that, you will find this screen here and the screen allows you to select from the
different options that there are.
So if you want to develop for a phone or a tablet, you would select the templates from here.
So basically, you have a bunch of different templates that you can use in order to get started.
And the beauty about those templates is that Android Studio is going to already give you a bunch of
code that you don't have to manually, right?
And that's really the power of using an integrated development environment such as Android Studio.
So if you were to develop for the watch, you would use Wear OS or for Android TV, you would select
something here.
And the same goes for automotive, but the course is going to focus on phone and tablet.
And you see by default and the empty activity is selected, so you can see that there are different
types of activities that you can select from, and they will have different kinds of pre-defined code
in them already.
For example, if you want to navigate between different screens, you would use this bottom navigation
activity.
If you want to have this button here at the bottom right, where you click onto it in order to add something,
you would use this basic activity.
But we're going to start with this empty activity, which is going to be pretty clean and we can just
build everything from scratch.
And that makes sense for you as a beginner, especially because you need to understand how things are
connected and how they are built up.
So it doesn't make sense for you to have this bottom navigation activity where a bunch of code is already
in there and you wouldn't understand it.
So I think it makes sense to start here.
Of course, you can also see that there are beautiful things such as AdMob ads activity where you have
ads in there or the Google Maps activity, or even such a logging activity, which will definitely need
in your developer's career.
But let's start with this empty activity.
So click next and then this screen pops up where you can create a new empty activity.
You can, first of all, give your application a name, and I'm going to call this one my first app.
OK, and then here the package name.
It always consists of those three keywords separated by a comma.
Usually that's come that example that my first step.
So it's like you would go to a website, then it would be the other way around.
It would say something like my first thought example dot com.
So here you need to use a package name that will be unique to your own app, because once you want to
release your application, it has to have a unique package name.
Otherwise, the Android Play Store will not accept it, and you cannot publish the application.
So here it really makes sense to have a package name that fits you.
In my case, I'm going to use you, the Terriers, because my website is called Tartarus that you thought
my first app and you could see everything is in lower capital letters than the safe location is basically
where your project will be stored on your PC.
You can change that any time by clicking on this button, and then you can select a different folder
if you want to.
I'm going to leave it at that.
And then you have the language here so you can select Java or Kotlin.
So this course is going to focus on Scotland entirely because what Google has said that they want to
focus on Scotland when it comes to app development and they don't want to work with Java that much anymore.
It has to do something with them running into some issues with Oracle, who own Java and so forth.
So I'm not going to go too deep into that.
But that's basically how they at one point decided to go with Kotlin, and we're going to use the latest
and greatest, which is codling.
Then you have the minimum SDK.
And as the case stands for Software Development Kit, which is a collection of software development
tools and one installable package, they facilitate the creation of applications by having a compiler
debugger and even a software framework.
There are normally specific to a hardware platform and operating system combination, so in this case,
the SDK is specific to the Android apps that we're going to build.
So here you can see that you have the API 21 with Android 5.0, which was called Lollipop.
Back then, Android versions had a name that was somehow connected to a suite.
You can see here Marshmallow Nougat, Oreo Pie, Jelly Bean.
And at one point, they just called them like letter Q R s.
So Android 12 is, of course, the latest version at the point of recording.
But it doesn't mean that you should select Android 12 because if you do that and you want to specifically
target phones that have Android 12 installed on them, you can see that this app will only run on one
percent of devices.
So that's not a good idea, even though it will contain all of the good and great features that Android
12 has to offer.
But it will be limited and will only run on devices that have Android 12 installed on them.
And until it is a reasonable amount of devices, years will pass.
So even if we take Android 10, you can see it's only installed on eight percent of devices, which
is why, by default, it offers you API 21, which is running on ninety four point one percent of devices.
And this is basically most people that have a phone.
So if a phone uses an Android version that is older than 5.0, then probably it's not being used that
much anymore.
Now, the cool thing is that Google was smart enough to create things such as app compat, which is
an app compatibility namespace that basically allows us to develop new features that will run on old
devices.
So they've really found a smart way around it.
So basically, you can use Android 5.0 or the API Level 21 in order to build your application, and
that will work flawlessly on ninety four point one percent of devices that are out there.
Now you can activate that you want to use legacy Android support libraries, which is if you really
want to specifically target old devices.
So I'm not going to check that box.
Now let's click on finish and let Android Studio set up the project.
You can see here that it says Gradle Colin Bell, and there is this progress bar, which basically just
says, OK, it's preparing the project, so it's creating all of the code and all of the project files
that there are.
OK, so here you can see that you have your coach in the main activity, Katie, which is opened by
default, but Katie stands for Scotland, by the way.
So this is a coughlan file and it is a physical file on your PC.
So if you want to go to this particular folder, you can right click and then go to open in Explorer.
This will then open up the Explorer and you can find the system main activity key file, which isn't
all of those sub folders.
So there's the tutorials folder.
Then you then Java Main C app.
My first step and Android Studio for projects.
So this is my first app, which contains all of those folders, which first IDG this Android Studio
has automatically generated for us, and that really makes our life a lot easier.
So you have this code, let's say you think that this code is too small or too big.
What you can do is you can go over to your settings right here, or you can press control alt s on windows
and then you can go to appearance and change the font.
While this font here will not change, the code font will change the size of.
This UI, for example, or the UI in general in your Android studio, I'm going to keep that at 18 because
I believe that's just big enough for you to follow.
But now if you want to change another font, you can just search for fonts here and then go to Editor
Font and here you can change to size.
So if you were to make it bigger, you would select a bigger value here.
If you want to make it smaller, you would select the smaller value here.
So I believe going with 20 is going to be fine for you.
So this is going to be the size that we're going to use here.
Now you can see that it has.
Now, let's have a very quick overview of what's going on here.
So on the left hand side, we have a bunch of buttons that we can click on and these are taps.
So when I click on this, you can see that this closes.
It's the Project tab, which allows me to see all of the project files.
And here I can go to different settings, which will also change the way those files are displayed.
So if I go to project, you can see that suddenly things look very differently.
And I would recommend to always keep it at Android because that's how I'm going to use it, and it will
make it easier for you to follow along.
So consider a bunch of files, right?
And most of them will not be relevant for us at the beginning, but we're going to go through them step
by step and I'm going to explain what they do.
Now, the most important file for us is going to be this main activity right here.
And it's this file that has already opened and you can see once I click on it while it opens up this
screen, it was open already.
So let's go to another file.
Let's go to this for file, for example, and I'll click on main activity and you see it jumps over
here.
So this is going to be the starting point of our application where everything starts.
Now, at the same time, you see that there was a different file opened up for me as well.
It's called the activity underscore mean that Axim L file.
So this is the XML file, which takes care of the user interface.
So let me drag this around a little bit.
You can see there are many different options here what you can drag and change the appearance.
So let me zoom in a little bit and you can see that this is basically going to be the UI of my application.
So currently, the only thing that it has is this little text that says Hello world, and I can click
on it and then I can see the attributes here on the right hand side and make changes to it.
But we're not going to do that for now.
Now the important part is that you see that there is a little editor which allows you to edit the UI
and the main activity and activity underscore May next while they are connected, which basically means
that this main activity uses this activity main L as its appearance, so to speak as its user interface
file.
Because here we are setting the content view.
So we're saying the content in the view, which means on the screen should use this file called activity
underscore main, which is this XML file right here.
Now, this activity may XML file, by the way, is inside of this address here.
So in the Java folder, that's what our programming code goes inside of the rest folder.
That's where our resources go.
And there are troubles which are images.
So for example, this green image as well as this little robot.
These two are images which in fact are vectors that then create this image.
And then we have the layouts in which we have our activity main XML file, which is this file here,
which we're going to adjust accordingly in order to make our app look differently.
So this is just for you to know where files are the Gradle scripts.
We're going to look at that a lot later because we're not going to patched it anytime soon.
All right.
But that's it for this video and the next one, we're going to set up the emulator.