♪ (robotic music) ♪ Hi, now that you know
exactly what Android is, let's just create
our first application in Android. To create that, you will be opening up
your Android Studio and you will be presented
with this window. And once you have downloaded all the SDKs, then you can go ahead
and design your first application. Click on the <i>start a new
Android Studio Project</i>. Here you need to give
the application a name. Let me just call it <i>MyHelloFirstApp</i>. And this is your company domain name, it can be anything you'd like it to be. In my case, it's <i>com.example.demouser</i>. Combining this Company name
and Application name, your package name will be formed. Make sure this package name is unique because when you're going
to upload your APK at the end, that APK package will be checked out by your Google Play Store. If it is not unique,
at that point in time, you might want to change
that package name. If you try to put this<i>
com.example.demouser</i>, is has already been taken
by Google, for example, you can't upload an application like this. Let's say you put <i>
com.planet.MyHelloFirstApp</i> and that domain is also taken
by somebody else, then you cannot upload it. It has to be unique. Next, this is your project location,
for our example purpose we are going to use
this package name only. This is the project location,
where our project is going to be saved. You can change it if you like.
Click on <i>Next</i>. Then you have to select minimum
and maximum SDK here. Maximum by default will be that latest one that is 25 API
or if you're using 24, 24 API. And then there will be a minimum
you will have to select. I could have gone all the way down to nine and you can see I will be targeting approximately 100% of the devices,
right now, in the market. The problem here is the more I go down the more I'm sacrificing the features. Because the <i>Gingerbread</i> will not contain all the features which
my Android API 25 contains. Of course, even if I am selecting 15, 15 will not contain all the features which my API 25 contains, right? But till 15, I can get
the Android Support Library, that is the external leverage
provided by the Android Framework and you can get those libraries to support those features
up until a version. I cannot get support libraries below-- all the way down to the 2.3. So that's why you need
to make a balance also, and you can see
while I'm selecting <i>API 15</i>, I can still target 97.4% of the devices. That's a good thing. Go to <i>Next</i>, then you will see
all of these templates, you can select any
of these templates to start your Android application development
as we are starting our very first app and we are going to start from scratch. I will click on <i>Empty Activity</i>
and press <i>Next</i>. Give the name of that activity,
I'm going to call it <i>MainActivity</i> only. That's it. You can give any name, whatever you like, this will ensure that
you're creating an activity name that is the Java file, plus the layout
that is the XML file. It will create a layout file,
if you don't want that, uncheck this. But you definitely want
the UI bar of your activity also, how, exactly activity
will look like on the screen. You want that,. And then there is
a <i>backward compatibility</i> checked. Turning this on that means your activity will be extending <i>AppCompat</i> activity. If you uncheck this then your activity will be extending <i>extended activity class</i>. So <i>backward compatibility</i> is to make sure that even the previous versions are able to access the new features which are there in new versions with the help of support libraries. Press on <i>Finish</i>. Let the <i>Gradle</i> build.<i>
Gradle</i> is a building tool here which is used by your Android system
to build your application. Please, wait for <i>Gradle</i>
to build your project first. If you try to keep on
clicking here and there, your <i>Gradle</i> might crash. You need a pretty fast machine
for <i>Gradle</i> not to crash. So let the <i>Gradle</i> build,
once the <i>Gradle</i>-- you'll see down below "indexing is done"
and <i>Gradle</i> is built, after that, you can see
this is the Java file that is <i>MainActivity</i>,
the Activity in Java file, and this is the Activity's layout file. That is the XML file. This is how your first application
will look like. Now before doing anything else,
let me just run this application. To run this application, first of all, you need to create a virtual device. How can you create a virtual device? There's this icon, AVD manager,
known as "Android Virtual Device". Click on that. Ei<i>ther there will be
a by default</i> virtual device created for you by Android
or you will be seeing this screen. You can even delete that <i>Virtual Device</i>
and come to this screen. Click on this button, and select one of the resolution device which you want to work on. That's a <i>Nexus 5</i>,
screen resolution 1080x1920. If you want to work
with this kind of resolution, go ahead. Or if you want to work
with any other resolution you can select that too. Press <i>Next</i>. Then it asks you what should be
your system image, which system image you want to run
on your virtual device. Now, here it will only show you
the system images that you downloaded, at the time of downloading
from your SDK manager. In mine, you can see there is
a 23 and a 25, so I will go with 25. I'm using <i>x86_64</i>
that too with Google API. If you don't want to use this Google API, then you can go with normal <i>x86</i> but then you must have downloaded
that system image here. Other images. Any ARM or image if you want
to work with that too. but I wouldn't recommend the ARM
as they are very slow. I'd recommend--
I'm using the latest one, To Google API, press <i>Next</i>. You can give the name
of your device or virtual device anything you want,
let's say <i>Black_Knight_01</i> and press <i>Finish</i>. Here you see my device is ready, all I have to do is press the <i>Play</i> button. Launch button
and it will launch the emulator. Wait some seconds and you can see the emulator will be
up and running in a bit. <i>x86</i> emulators are way faster
as compared to your ARM. If this would have been an ARM machine, it would've taken a long time to run. This won't take hardly a minute to turn on and I would recommend
once your emulator is on, whenever you're developing,
do not close your emulator. Unless you are done for the day
or done with the development for the day, why ? Because every time you close
your emulator and run it again it will take the same time
to launch the emulator again and again. So what you can do here
is just run it once and then after that,
keep on running your application from your Android Studio and they will directly go
on your emulator. So your emulator doesn't have to restart
or get the resources again. How will you do that?
As you can see, my emulator is running, What I would do to run my application is here, you can see a <i>Play</i> button
launch button, or run button. Just click on that. My Android Studio automatically detected
that there is a device connected to me,
that's called <i>Black_Knight</i>. Press on OK. And this application will run
on my Android device. Just wait for it, <i>
Gradle</i> will start building. If there is any error or something, that also will be detected
at this point in time. There we go. So this is my very first app,
which I have created from the Android App Studio. Even if you close your app now,
you go to your apps, you can see your app here. You click on this, so it's just behaving
like any other app. Now before moving any further in Android, let's just learn a little bit
about your Android Studio ID, etc. The left bar is known as project panel,
we will come to that. This middle area is known as code area, or you can create your layout also here
by dragging and dropping. The middle part is known as your console. This is where you will be seeing
what is going on with your Android. I just ran an application here,
in my Android Virtual Device. So it gave me what was going on,
this was the run mode, what was going on
with my application in run mode. But you can go to your Android monitor,
also you will see a <i>logcat</i>. <i>Logcat</i> will be your friend throughout your Android
application development because it tells you what is going on
in your Android Virtual Device. Okay, so now you can see here, this part here is known as project panel, in this, what you are seeing
is the Android Project Data Key. We'll talk about other project data key but when we talk about
Android Project Data Key, you will see your project
is divided in two parts, one is your app folder, and the other one
is your <i>Gradle script folder</i>. Let's just talk about <i>
Gradle's script folder</i> first. When we open up our <i>Gradle</i> script,
you will see that in <i>Gradle</i> there are mainly three types
of <i>Gradle</i> file, one is called <i>ProjectMyHello.Gradle</i> which will contain nothing
but the information about my <i>Gradle</i> version itself
as you can see which <i>Gradle</i> I'm using
right now is <i>Gradle 2.2.2</i> and include all the repositories
in this project. Second <i>Gradle file</i> which we will be seeing is module level <i>Gradle file</i>. As I only have the mobile module here
so there is only one. If there would have been
an Android <i>wear</i> then there would be a wear also. If there would be TV, then
there would be a TV module file also. So there is only one,
what exactly it contains it contains the information
of all the module itself. What is the minimum version
of SDK I'm going to use, what is the target version for this SDK, what is the application ID, the compilation SDK version,
so all that information will be included
in this module-level <i>Gradle</i>, Even the dependencies you want to add
that is libraries and all-- that will also be added in this. As you can see there are this many
libraries as of right now. I'm using the <i>Espresso libraries com</i>, and the <i>com support</i>, there is app compact support
libraries also, I'm using <i>JUnit</i> library also. If you want to add any external leverage that also will be adding
inside dependencies on it . So that's what the use
of the module <i>build Gradle file</i> it [inaudible] and gives you the information
about that particular modules. Next <i>settings.gradle file</i>, it's again one file per application. It tells the compiler which module has to part into the compilation at any particular time. For example, if you have
a better application designed also
for your mobile, TV, and wear, and your TV, and wear
are still not complete for the production level. Then, when your mobile app
for <i>wear</i> is complete then you can include the module
of mobile here only. Like this, mobile. Then the name of the <i>Gradle file</i>, like, right now, it's <i>app</i> here,
it will be mobile. And if there is a <i>wear</i> also,
then we will be putting <i>wear</i> too. Like this: <i>wear</i>. If there would be a <i>wear</i>
that's the condition, that there is a <i>wear</i> module too. Okay, so as of right now,
there is no <i>wear</i>, so it's only just one,
that's why this <i>setting-gradle</i> file contains only app because that's the only <i>Gradle file</i> you're going to compile
whenever you're going to run it. Okay great, so that was <i>Gradle scripts</i>. Now let's talk about <i>app bar</i>, in the <i>app bar</i> you will see
mainly three folders. First is your manifest project. Inside this you will find
a file <i>android manifest.xml</i>, this is the file
which comes in contact with your Android device
for the very first time when you install your application. So when this application
is getting installed in any emulator or device, this is the file that will come in contact with your Android device
for the very first time. What exactly it contains,
it contains the information about the application itself,
like the package name, what's is going to be my package name, the application's information
like how many screens or how many activities it'll contain. If there are more screens,
then you have to register them here, only, again if there is another activity, there will be another activity tag. Or if there is more services
then there will be more services tags. And it will also include the permission,
let's say your application is going to contain any permission
like internet permission, or access netbook permission
or GPS permission. You need to declare those permissions
here inside this manifest file only. Let's say, I want to include
the internet permission I will use this permission, internet,
and there you go. So this is how your permission
gets added also. So that was Android manifest. In the manifest file you can see
there are many attributes, like <i>AllowBackup</i> will make sure that your application
is compatible for backing up. And icon attribute here
is getting the icon from <i>@mipmap/ic_launcher</i>. I will talk about this <i>@mipmap</i> in a bit, but know that this here
is getting the icon... Or this label attribute also
is getting the text from your resource folder. We'll talk about how it's getting there. <i>SupportRTL</i> is again right to left, there are language which go
from right to left so this application
will support RTL language too. And <i>theme</i>, I'm getting this style
from resource folder we'll talk about that also, but know
these attributes are setting... This one is setting the icon
to my application this one is setting the name
or label to my application and this one is setting the style
to my application. Now let's just go to our Java folder. When you open up your Java folder
you will find three package, First package is know
as development package. Second package is known
as Android test package or instrumented test package. Third package is known
as unit testing package. The first development package you will put all the code
for your application development. This is the package which
you'll be dealing a lot when you're doing
the Android application development. All your activities, services, broadcasts, content providers, database classes, all those classes will be kept inside
this development package only. As you can see there is
only one activity right now, that's <i>MainActivity</i>, if you open up, this is how your <i>MainActivity</i> looks like. Inside your <i>MainActivity</i>,
you can see that-- activity is nothing but a class
which is extending <i>AppCompatActivity</i> and this <i>AppCompatActivity</i>
is being inherited from or is taken from
your Android support library. As you can see,
AppCompatLibrary is important for your <i>android.support.v7. app</i>. Now if I would have done activity also, then, also syntactically,
there would be no problem because ultimately,
this is activity only, right ? I'm designing for the latest version then the features like material design all the new features,
will not be supported by the previous version
if they are not included there. So that's the reason I want to do
the <i>AppCompatActivity</i>. Inside your activity, you can see
there's a method I'm using, an overrided method called <i>OnCreate</i>, so that <i>OnCreate</i> method is already defined inside <i>AppCompatActivity</i>
and I'm just overriding it. And inside this, there's
the very first statement I'm doing which is <i>super.OnCreate</i>. <i>Super.OnCreate</i> will make sure
that before I do anything, before I do any customization
in this particular method I want to use all the functionalities which was there in my parent activity. I don't want to temper
with the functionality which was provided to me by my Activity class,
the <i>OnCreate</i> functionality which was provided to me
by Activity class. I want that. Plus if I want any
of my own functionality that I would be including
after including this statement. Once I include this,
then I'm including my own statement that is <i>SetContentView</i>. I'm providing
a particular view to my activity and that I'm also doing
with <i>R.layout.activity_main</i>. Just for now, understand that
I'm attaching my layout file here. I'm attaching this layout file
as you can see, <i>Activity_Main</i>, <i>Activity_Main</i>. I will discuss into more detail in a bit on how exactly it's getting attached but you can see <i>activity_main</i> is the file which is getting attached
to this particular <i>Main Activity</i> here now. So that was the development package and that was the <i>MainActivity</i> file. In other packages like Android test, you will see the files
which are used for UI testing here all the UI testing class
will be put inside this-- All the <i>JUnit</i> classes testing, all the classes for <i>JUnit</i> will be put. So that was the Java folder. So the Java folder will
specifically contain all your coding bar. Now let's just come to <i>res folder</i>. Now, <i>res folder</i> is a very important folder in your Android application development because Android application development
is not just about Java, it includes your resources
and they can be images. Resources can be layout files,
XML files, any <i>values resources</i> that you are providing [hard-coded]. So let's talk about them in more detail. There will be a <i>res folder</i>
and inside that <i>res folder</i> there will be some
dedicated folders like <i>drawable</i>. <i>Drawable</i> is a folder which will be used
to include the images. Generally the drawable-- Each and every folder you're gonna design
inside your <i>res folder</i> will have a specific purpose. So the drawable here
is used for your images or if you have any animations, selectors. For those kind of things
you will be using the <i>drawable</i>. You will be seeing more of it
in your folder's sessions what exactly this <i>drawable</i> folder
can be used more for. For now, understand that all the images and animation parts you'll put here. Next is your <i>layout folder</i>. <i>Layout folder</i> is a folder
where you will provide all the layout for your activity. All the UI part, any layout you want
to show to your screen this is the folder
where you want to design. So that file which you just saw,
this is where it resides. <i>Activity_Main.xml</i>, any XML file you're seeing,
any layout file you're seeing, they are in your <i>layout folder</i>. You can see that this layout here
is the drag and drop screen. That is called layout,
there you can drag any button right now, and place it where you want. This is the Drag & Drop bar,
when you click on the text tab here you will be able to see
the coding part, and the XML part also. We will discuss about the coding part and how exactly you can deal
with these XML parts for the session. But for now know that : in layout folder,
all the layout file exists and you can edit the layout
of these XML file with the app <i>Layout Editor</i>. Next is your <i>mipmap</i>. <i>Mipmap</i> is a folder which is, again,
used for your images only but here you can put the different screen resolution
images together. As you can see, the image here
is known as <i>ic_launcher.png</i>. Each and every image
is named the same here, like <i>ic_launcher.png...</i> but you can see the difference
is the resolution. There will be images which will be-- This image here is high pixel image, then there is extra high pixel image, then there is extra, extra high pixel image,
so the resolution changes. If you have an image
of a different resolution, you will put it in the <i>mipmap</i> by putting the same name. If my image name is logo and I have five different
resolutions of logo I will put logo only
but the resolution will be different. Like one maybe 42x42, other maybe 72x72 and other one, maybe,
extra high 128x128. So automatically, it will create a folder which will define my high density
pixel image differently, and medium density pixel differently, and extra high density
pixel image differently. So what are the use of it? If you run your application on any device which uses extra high density pixel, you don't have to specify
or put in the code that use this image. It will automatically adjust that, "okay this is my extra high
density pixel device". It will automatically
pick this image only. That was <i>mipmap</i>. Now let's talk about values,
now values is a folder where you generally put all
your other resource which you want to put or show to the users, like colors. <i>Values</i> is the folder where you want to define your different resources, to make the localization. So you don't have to define
those resources again, and again. It may be any string value,
or any title, or any color also. As you can see, I defined
a color <i>file.xml</i> separately and then defined the color tag. Remember that any resource
you want to define, you have to use the resource tag first. So now this will be a resource,
this color will be a resource and the name of the color by which
I'm going to access it anywhere, is now <i>ColorPrimary</i>. The use of this will define the resources, let's say, this is the color right now. As you can see, the color is 3F51B5. I don't have to remember
this color code or hashcode again and again. And I can directly use this <i>ColorPrimary</i>
wherever I want to use it. In a bit we are going to see
how exactly we can use it. In the second uses,
let's say tomorrow your boss says "I want to change this color". Instead of <i>ColorPrimary</i>, you define one more color here, and that color is <i>Title_Color</i>,
let's call it color. You define a color called 99ccc-- So, 99cc00. Okay so this is my <i>title color</i>. Let's say tomorrow your boss say,
"we're going to change our title color". So you don't have to go
to each and every place where you had used this hashcode. If you would have done hard-coded here, you'd have to change the hashcode
in each and every place. Here you are just going
to change the color here and wherever you've used this name there, all those places
will be receiving the changes. So that's the beauty of defining
the resources here. So in this way I have
to find resource colors only here you can see <i>ColorPrimary</i> <i>ColorDark</i>, <i>ColorAccent</i>
and <i>ColorTitle</i>, right ? One more thing I want to point out here,
anything you put in your resource even a image, even a layout file,
even all these color which I'm putting here right now,
anything you put in your <i>res folder</i>, they get a registry inside a file
named as <i>Android Java file</i>. <i>Android Java file</i> is
a system generated file which is being provided to you
by your Android system itself, or the Android application itself,
so you don't have to create it but whatever you do inside the <i>res folder</i> that will get entry inside
the hard-coded Java file. As of right now, the color
which I have just defined, the whole entry plus the <i>ActivityMain.xml</i>
should also have entry and all these <i>mipmap</i>
should also have a entry. Let's just check that out. You won't be seeing <i>R.java file</i>
inside your Android data key. To see that, you'll need to change
the data key to package. and inside the package,
this is your development package. You can see R, just click
on this <i>R.java</i> file and you can go back to Android now. So this is your Android <i>R.java</i>
you can see that file under the <i>build folder</i> are generated
and should not be edited. So you are not to tamper with this file. I'm just showing you this
to prove my point that everything you put inside
your <i>res folder</i> is registered here. So I'm gonna find my <i>ActivityMain</i> first. Anything you put inside your <i>res folder</i> will get registered inside
your <i>R.java file</i> but in the same way
that you're defining it. Like your layout file
that is <i>Activity_Main.xml</i>, you have to find inside
a layout folder, so it will be inside your <i>R.java folder</i> but inside a <i>class layout</i>. So... <i>Class Layout</i>. You can see <i>class layout</i>
and then inside that, the name <i>ActivityMain</i>. [inaudible] Yeah, there we go.
So you can see the entry here now. In the same way, let's talk about <i>mipmap</i>. So <i>mipmap</i> will be registered
inside the <i>R.java file</i> but with <i>class mipmap</i>. You can see here under <i>ic_launcher</i>. Mainly this is just one image, right? So with just one name, so that's why
there is only one entry. I just saved a bunch of colors there
so to check out colors which class will it be saved in?
Color. Resources color. As you can see, the tag is color here. So, color. And inside color you can now find out what is the name by which you saved. <i>ColorPrimary, ColorDark,
ColorAccent</i> and <i>Title_Color</i>. So you just have to find out
the <i>ColorPrimary, ColorDark</i>... Yeah, see, <i>ColorPrimary, ColorDark,
ColorPrimary Dark</i> and the <i>Title</i>. I included my own, <i>TitleColor</i>. So it will be somewhere around here If anything is not there,
you can even rebuild your project and sync it now. Okay, now find color, class, color. So we have already seen
that <i>ColorPrimary, ColorDark</i>. Sorry, color. <i>ColorPrimary, ColorDark,
ColorAccent,ColorPrimary Dark</i> And there's <i>TitleColor</i>.
Yeah, there we go. <i>TitleColor</i>, which we saved here, right? So any resource you create,
there will be an entry. Now you can see... In the same way there is
a dimension folder or <i>dimens</i> folder. Inside which we are defining some spaces. <i>Dimens</i> are used to define blank spaces and putting some horizontal margin. That is 16dp for the default screen size. But if the same screen size is a tablet, or a screen size with a 7 inch screen,
or 10 inch screen the same horizontal margin will become 64. Can you see that?
The name of <i>Activity_Horizontal_Margin</i> is the same as <i>Activity_Horizontal_Margin</i>. So Android will automatically detect
which device it's running whether it's a tablet or a device. Accordingly, it will pick one
of these resources whenever they are being used. I still need to tell you
how to use these resources but... Know that this will get an entry
inside of your <i>R.java file</i> <i>Dimens</i>... Yeah, you can see that. There will be an <i>activity_</i>... Yeah. <i>Activity_Horizontal_Margin</i> and <i>_Vertical</i>. Next...<i>String</i>. So you can see here
there is a string also. I have created under resources string
with the app name <i>My-Hello-First-App</i>. The reason here is... See here. Every time you open up your app, you'll see this <i>My Hello first App</i> that is because you have to find it here. Now, let us see how exactly I use this, how exactly I use my resources. You must have seen in your manifest file, when you go to your manifest file
I told you that icon-- this icon is used to set my icon. But, how exactly, it's setting my icon because there is <i>@mipmap/ic_launcher</i> so <i>@mipmap</i> means I'm going
or I'm referring to my <i>mipmap class</i>. <i>@</i> first of all, let's
just talk about what is <i>@</i>. If you are defining or if you are
accessing your resources If you want to access a resource,<i>
mipmap</i> is what? A resource. If you want to access a resource
inside a XML file you'll be using <i>@</i> to denote
your <i>R.java file</i>. This <i>@</i> right now is denoting
or is referring to my <i>R.java</i>. So first statement will do what? @ that means it goes to <i>R.java file</i> and inside <i>R.java file</i> which class
I want to go ahead with? That is <i>mipmap</i>. So it will start searching
for <i>class mipmap</i>. So inside <i>mipmap</i> also
which file it want? <i>Ic_launcher</i> So is there an <i>ic_launcher</i>? Yes. So that's the reason you were able
to see the icon here. You were able to see this icon. If you want to change the icon
just give some other icon. If you have any other image here you can give any other image
and the icon will change. Let me just check
if I have any other image-- Let me just copy this
and paste it here inside the <i>drawable</i>. I'm putting it in <i>drawable</i>
but you can put it in <i>mipmap</i> also, if you have more then one icon or different resolution size
of the same image. So, if I'm a referring it
from <i>drawable</i>, this time , how, exactly, will I be referring it? Again, go to the <i>R.java file</i>
by using @, but this time I won't be using <i>
mipmap</i>, I'll be using <i>drawable</i>. You can see in the <i>drawable</i>
there is an dog icon. So if I run this... Just make sure if you are using icons, those icons should be
actually compatible to the icon size. You can't expect a big icon size or big image to become an icon. So I don't know if my image
is actually an icon... yeah. It was compatible to that. So you can see here,<i>
My Hello App</i>-- now the icon has changed. So in this way you can use the resources. Every time you want to use
resource inside a <i>res folder</i> you'll be using <i>@</i>
and the <i>class name</i>. So in the same way you can see <i>label</i>. <i>Label</i> is one of the titles you see here. As you can see, I have <i>MyHelloFirstApp</i> how exactly it's picking up <i>
@string</i> in the resource folder, there is a <i>string</i>.
an <i>@ string</i>. And inside the <i>string</i>
there is a name <i>App_Name</i>. Did I define this resource? Yeah. You can see in this <i>string</i>,
I defined <i>string</i> and the <i>string</i> is <i>app_name</i>. If I change this here... <i>First App</i>. So now I don't have
to worry about changing it there. It'll automatically get changed and every time
you open your application now, there will be the title <i>First App</i>,
instead of <i>MyHelloFirstApp</i>. So you see <i>First App</i>.
There you go. So I hope this makes things clear in the same way you can
check all these styles. <i>Style</i> gives you-- <i>Style</i> is, again, one of the resource which tells how exactly
your application will look like, so, in this particular style
you can see that I am using a theme. That theme is also<i>
Theme.AppCompat.Light.DarkActionBar</i>. Now this <i>appcompat</i> is very crucial because in your Java or in your Activity you are using <i>AppCompat Activity</i>. If you would be using
a normal <i>Activity file</i> here, now, at that point of time,
the syntax is right, but when you run this application, the theme will not be compatible
with the [source]. The UI you want is not the-- You may not get the same UI that you want. If you are using Activity
then according to that Activity, there will be a different theme. So I'm using <i>AppCompat</i>, so for <i>AppCompat</i>,
I'm using the <i>AppCompat theme</i>. Light and Dark action bar. And you can see I'm customizing it
by using one of the items. I'm going to customize one of the items
known as <i>ColorPrimary</i>. And here you can see <i>Asset</i>
is a XML file, right? So I won't be using colors, it will be <i>@color/colorprimary</i>. I have already defined a <i>@color</i>. Isn't it in the color file?
@color, color file-- Great! In the same way
I'm customizing other also... Let's say I don't want
to put color primary, I want to use my color
which I have just defined. So it is <i>title_color</i>. So now, if you run this
you will be able to see the color has changed. So this is how your resource
of file works around in your Android. So this how you access your
resource file inside the XML. That is by using @. If you want to access
your resource file in your Java-- As you can see
I have attached this layout, attached this file which
is defined in <i>Layout</i> inside my Java file,
inside my <i>Activity</i> with the help of resource file only. So if you are accessing a <i>R.java file</i> inside your Java folder, then you will be using <i>.operator</i> You can see, again, I'm using<i>
R</i>, this time no @ <i>R</i>, then <i>dot</i> and then,
the class name that is <i>layout</i>. And then, the file name
which you want to process. That's how you'll be accessing it. Ok so, that was an overview on Android Studio
and the Project Data Key. And what are the different components
you see in your Android studio. I hope this will help you
in understanding your Android Studio better. In further session we will learn more
about designing UIs and how exactly we can work
around with our screens and all. So that's it from my side
an introduction to Android Studio and Android. Thank you ♪ (robotic music) ♪