Hello this is Martez or Corti.
Make sure to open this site that exam a fine and the colors are exemplified inside inside a values folder.
So let's open this sidetracks that file.
Here we have the theme.
The theme is the name is Alphyn and the parent is Feme that app compact So what is this app compact.
This app compact is going to specify that our application is going to be compatible with a lot of versions
of Android operating system.
Because the longer versions of app and with the operating system may cannot actually handle material
design right.
So if we use this Campana this app that accompted Ingall in order to specify that so that this app compatibility
is going to Solvay handle the lower versions of Android operating system maybe we want an app to be
actually compatible with those versions of our operating system.
But if you remember we said that we want the lowest version the minimum STK of our application to be
Android lollipop.
So this means that we don't have to use this app compact here because the and a lollipop can handle
handle material design.
So we can for this film here we can just change this when we can say for the parent listed its value
and we can say that because we want to use material design here at sign Android Colin.
Hi slash.
Dot and here I we to see material dots so we can specify some other attributes so let's say no action
bar right.
No action.
But let's use this one.
We have this one.
No action.
And we have this Vienneau actually embodied that full screen no action but no action but that overscan
or no action bar that translucence decoration.
So let's use this one but no action.
And here let me show you the layout.
It's open the entry view.
And let's go inside this layout folder activity Underland calculated exemplified.
So here you can see that the layout is changed here.
And let's open our web browser here and just search for material on Android and then it's going to actually
show you this line here using the material Feme and readable of hers.
Let's click on this one.
So here it is using the material in the new material provide system widgets that let you set their color
palette touch feedback animations for the system widgets activity transition animations.
Right by just using the material theme.
We can do all of these things here which as you can customize the look of the material according to
your brand identity with the color palette you control.
You can teach the action bar anti-status body using the female attributes as shown.
So here let me show you the emulator.
We have the action bar.
Let me actually run the app first.
So as you can see there is no action bar here.
But I'm going to show you that here for us.
Go to the stance that exemplify and here let's say that we have only this one field that material but
let's just say that that part that says no action.
But I want to run the app.
So it says the app is crashed.
There is a bug in our app.
Remember that I told you that you don't have to worry about the lower versions of 100 of the Android
operating system because you already specified that the minimum STK is going to be an orderly path right.
But there is a problem inside the job folder here.
If I did buy them if I click on this large cat here let me show you the book with the address.
So here let's let's run the app again because I want to shoot the locks here and now the app crashed
so let's search for the air.
So here it is verbose.
Let's go and click on error.
And here we can actually find the error.
But he likely can take a look at this link.
Here it is until later at about 11.
If I click on this link here it's going to show you that this line is set content.
View art that lay out the activity on line calculator is the cause of the error.
But that's not.
Yes it's true but that's not really true because we changed the theme of the app.
Right.
We said that we don't have to worry about the larger versions of an operating system but here it says
Processo above this line.
Here it says dotted line at runtime exception.
So let me show you that here it says Javal that illegal state exception you need to use a field that
app compatibly.
Right.
Take a look at this one app compact or descendant with this activity.
The problem is this activity is that of a file.
Let me just close this actually lucky part here and here this class calculator extends app compact activity.
So it's not good for this specific application because we changed the fien to material that's fine too.
So here I am going to just delete this value and I'm going to say activity not at camp activity but
the activity itself.
Now we can run the app.
Let me show you the emulator.
And now our application is not going to crash.
Right.
So here you can see this status but at the top that contains some actually some general information
about the app for example the notifications of this clutch the battery LTE Internet or the SD card.
Some general information about the whole device or the notifications or the app.
Right.
And we have this one this toolbar that contains the label of the application.
My calculator here.
So let me show you the Devar browser.
It says you can customize the look of the material according to your brand identity with the color palette
you control.
You can tint the action bar and this spot this means that we can change the color of the status bar
and the action bar here.
The system all widgets have a new design and touch feedback animations.
You can customize the color palette the touch feedback animations and the activity transition for your
app.
So it is you can customize the color palette.
The color palette uses R.G. colors.
So.
So I just opened another tap for you and searched for the RTP colors.
You can click on this link.
Here are the color codes chart.
And here we can find some pretty colors.
So for example we can find this one this color and if I click on it here so let's go down here we can
actually see some other colors here.
For example this cream some color here it is the RTP color right.
I just need to copy this value.
And as you can see this one is the hex code and this one is the RTP color.
So it doesn't really matter.
You can actually choose this one.
But if you want to use a hex code you need to put the hash tag before that.
So let me copy this value.
Let's go to our Android studio and let's go into these colors that exemplified.
So we have this color primary right.
Let's divide this value and instead put our value here.
Hash tag DC 143.
See now we can see at the left sidebar the color is crimson color as the color primary.
Let's go to the browser and let's choose another color for the day for this one color primary Dortch.
So let's say that we have this Tartrate.
Copy this value.
Let's go to suit you.
And let's paste this value here.
Let's left Sipar.
You can see this color is changed.
And here we have this color axen.
Let's open our web browser.
Let's use another color.
Let's choose this yellow as the color accent and paste this value here.
Now let's go inside is activity on the line.
I calculated that XML file as you can see the changes are not reflected here.
So let's run the app.
Let me show you the emulator.
So again the changes are not reflected here also.
So here there is a.
This means that you're inside these signs that XML file.
Let's click on it.
Here as you can see we are actually using these colorists.
For example the color primary color primary dark and the color accent inside is Titanic right.
Thinnings Alphyn and we chose that material but these colors are not actually used inside or lay out
for example for the status bar or the toolbar.
The color primary art is used for this tattoo spot and the color primary is used for the toolbar.
So how we can actually solve this problem.
Here we have these items right.
The name is colored primary.
So here we want to actually use the color primary of our app that we specify inside the colors that
exemplified the Android system.
You want to use the Android colon color primarily like this one.
This is very important all here this one color primary art.
Again we need to put Android colon color primary to our human to use the color of the Android system
and again for the color accent we need to put Android colon color accent.
Now if I go into this activity are there like minute example you can see these changes are now affected
here.
The status bar.
And we have this one this toolbar.
So let me show you the web browser and here it says that the material is defined as Android style slash
feel that material the dark version.
So we used the dark version right.
We have all sorts of other versions.
We have found that material that light the light version.
Let me show you this version too.
Let's go into these slides that exam and find.
And here it is fien that material.
That's light.
Let's go into this activity Odelein calculator the rest of my file.
Here you can see this is the light version.
Let me show you the web browser.
And we have this one feinted material that light dot dot action part.
So let's also see this slide.
What is that material that light that dot action board.
So here we can see dot dot action bar.
So let me show you the activity underline translated resume.
So here because we already changed the color of this toolbar we can see that it is not affected here
at this site.
So let's go back to the study that stands that is fine and let's choose that light.
The medical field that material that light.
I like this style for my app.
You can't change it if you want.
But let me show you the Amul the browser.
So here make sure to actually read this documentation here in order to learn more about material design
in Android.
So let me go back to our studio and we have this color primary color primary dark color accent.
Make sure to put and call in here before these names are otherwise.
These changes are not going to be affected on our application.
So that's it that's enough for this tutorial in the next tutorial we are going to design an app for
the widgets to do the layout.
So thank you very much for watching and I look forward to seeing you in the next studio.