Come back in this video, I would like to believe this green here, you can see we have a result at
the top here, then a little image to background that we used before and then a text view, another
text view and then a text view and a button.
And I would recommend that you try to build this UI yourself.
You can download this trophy from the resources of this lecture, but you can also choose just another
image that you want to use here.
But generally speaking, you should be able to build this UI yourself.
So I'm going to keep it simple this time I'm just going to paste it in and going to go over the details
of what's going on.
Therefore, let's, first of all, create a new activity.
And I'm going to call it result activity, so here, empty activity.
And result activity is the name for it.
Let's generate it, and now let's go over to the XML file.
As I said, I will keep it simple.
And as I said, I will need the trophy, so you need to paste it in here.
You can, just, as I stated, copy it from our project or you can use whatever image you want.
Now let's go over to the code of this activity result x amount.
OK, so first of all, I have a linear layout, so everything is inside of a linear layout.
It matches the parent in both directions, which means it takes the entire screen as the background
of it.
I have defined this icy background image, as we have seen before.
Then the orientation will be vertical, so the items inside of this linear layout are going to be on
top of each other.
The gravity will be center horizontal, so it will be centered horizontally.
The padding will be to pick density pixels, which means that there will be an internal distance to
the items inside of it of 20 density pixels, as you can see here.
Then I have the first text you, which I gave the idea of TBE result.
It wraps the content in with and height, and then the margin towards the top is going to be 20 density
pixels.
It just says result and the text color will be white.
Text size is 25 and the textile is bolt.
Then we have this image here, which is going to be the trophy, and I gave this the ID of Ivy Trophy.
The content description is going to be that it's an image, OK?
And it's wrapping its content in height and width, and the source for it will be this icy trophy.
So this trophy image that we have here.
Then we have this text you hear which says, Hey, congratulations.
It has an idea of TV, congratulations.
The width and height of our content.
I have a little bit of margin towards the top.
Text size is 25 as well as style is bold and the text color is white.
Then we have another tax deal with the two names.
This will be used to display the name of the user.
Then we rip the content in terms of with it height and the margin top will be twenty five density pixels.
The text color will be white.
Text size 22 text style is going to be bold.
Then we have this square where it says your score is nine out of 10.
It has an ID. It's repping the content in width and height has a little bit of margin towards the top,
as well as secondary text, dark color, which is going to be a darker color.
And then we have the text size of twenty ISP.
And finally, we have the button button finishes, how I call it.
It's matching the parent in terms of width, so it's going to take as much space in terms of with as
possible.
And in my design, it doesn't seem to display correctly.
Then we have the height of web content.
The margin of ten identity pixels towards the top and I'm using their background color of white.
So the background tint, that's what you have to set up for buttons.
If you want to have a background color for them, the text will be finished and I'm going to use this
design default color primary, which is this purple color.
Text size 18 and textile will be bold.
And in my case, the problem seems to be that the image view is just too big.
So what we can do is, of course, we can define its width and height to be 200 deep, for example.
And then this is how it's going to look like.
Maybe we should make it a little larger.
So something like 300 dpi.
And then we will see that our user interface works.
So we have our trophy.
We have Hey, congratulations, username, your score is.
And then finally, the finish button.
So that's generally more or less how this design, as you can see here, is going to look like.
By way, in my case, this has to do with the imagery that I'm using.
Being way too big, you can, of course, change it in the designer here as well.
You can make it wider and then you will see that it's going to zoom in a little bit.
So that's what the designer can do for you.
And then you see that the width, in fact, is going to be more like 300 dpi.
So if we look at it now, I believe it looks a little better.
All right.
So that's it for this video and the next one, we're going to do the final touches so that we can actually
start the activity for result from the very first beginning and then get the user name from it and as
well as the score.
So how many points we got, how many questions we have answered correcting.
So see you there.