Hey there.
Well the time has come for our final application for this eczema layout topic.
Let's start.
Create a new Android Studio project click on Start new project and call it Android UI user interface
then next one more time next and finish
so our new project is creating in Android to do go to the tap activity on the score main not simple.
Now everything has loaded And now let's look at the design tab.
Let's increase for convenience.
As you can see there is the standard.
How low will text.
I'm deleting it and first of all put here image for you
I have prepared the image and we need to put it in our application.
As you remember we need to open the folder with resources arrays and then put the image to the drivable
folder.
My image is on the desktop.
I copied from here and paste to the draw BILL FOLDER.
Click Okay.
Then one more time.
Okay.
It's appeared here and I can again put this image you on the screen and specify the image here.
And why I don't see it.
Oh no it's clear it happened because my file is named incorrectly.
It is named in camel case format and we can't do it for those files which are stored in the race folder.
We must rename this file.
We can do it like this all right click on the file next refactor or a name.
And here we can rename this file
and to make these words look separate.
We can do it with underscore click refactor and now let's try to set our image you again and as you
can see file has appeared in the normal folder and now it is displayed here
so we have the file and now we need to set its scale type
I'm choosing center crop so that image completely fields the screen and is centered.
And now I'm adding the text you in our layout on the screen.
16 2.
And let's add another 2 let's now go to the text up and see what happened.
So as you can see all views are underlined with red line.
Let's change the constrained layout to relative layout that we are all already familiar with.
Now let's remove the constraint cloud attributes which we don't need anymore.
And now let's see what happened.
Okay.
Our tax shifted by default.
As you remember in the upper left corner.
Now we need to arrange them in our layout.
Let's leave the top text you in the upper left corner.
The second text you.
Let's set in the law right corner.
For this we need to do next.
We have to set out a line parent right attribute and set it to true.
And the second attribute line parent button also set to true
and let's see what we got.
Mm hmm.
It's not very reasonable but uh here it is.
So now let's change the text color first
on making it white.
Copy this attribute and put it in the second text to
well let's see what we got.
Yes it's okay now.
We need to change the text size
let's set it to 30.
It's B and to the second the same attribute.
Let's take a look.
All is displayed.
Correct.
And now let's change the text itself at the top.
All right.
Android
rock star
let's take a look.
And the below text.
Let's change it to.
Sincerely yours euro.
Here we go.
And now I want to change the style or the format itself.
Upper and lower.
Let's change.
First the top to do it.
Let's go to the design tab click on this text you and hear from family.
Scroll down to the bottom and you see more forms click on this option and try to choose something you
like.
There are a large number of forms.
For example I like this one.
Let's click on it.
Next click Okay.
And so you see such an unusual phone appeared.
Let's move it a little bit to the right and down
to do this.
I will say the margins margin taupe or these texts to you for example letter the 20 DP and margin left.
8 DP
Let's see.
Okay.
It suits me.
Next go to the law text you.
Let's change the font to
for example this one color graffiti such as handwritten.
It's a little thin so I'll make it bold and I also want to make these text diagonally as on a poster.
When somebody sign it to do this I will add here an attribute called a rotation
and let's try setting the value of this attribute to 30.
As you can see the text is rotated 30 degrees clockwise but I want the other way for this.
You need to put minus 30 and you'll see the text turned by 8.
Move down let's do minus 40 to rotate it even more.
Now I will make margin bottom for this text for you for example 70.
DP
Well it's a little bit raised
well it's at 80
quite good.
But we can improve with a little bit.
Uh probably the name should be written in the second line to do this.
Put backslash and end in this line Max slash and n is used to go to the next line.
You see the word following.
The sign is carried over to the next line.
Well let's try to run this up and see how our own image will be displayed on the emulator.
Well our poster looks pretty good.
One more thing I want to do is to change the name of our application that is displayed on these top
panel.
Let's change the name of our application to let's rocket for this.
Let's go to the Android manifest.
Open it.
And as you see here a lot of different information about the application.
But at the moment we are interested in this attribute.
Android label Android UI is displayed here now.
And if you click on the text you will see here the value add three slash app name.
This means that the name of the application is placed in the resources folder in the file.
Strings Dot.
Example let's open this file and as you can see here is the string with attribute name and value app
name the same value like in Android manifest file.
So let's change its value from Android UI to let's rocket
and now let's move to the activity may.
And as you can see the new name is now displayed on the top panel.
Well I congratulate you.
You have learned a lot in this part of the course.
Of course there is still a lot of information on this topic which we will continue to study in this
course.
Next we will start learning Java language.