Hello there.
I'm GAFCON.
And welcome back to Monday tutorials.
In today's video we'll be talking about God.
So what is a garden.
It is a view group with some special attributes like corner radius and elevation.
So let us design some study.
Let's start with the new project let's call a project called tutorial so called tutorials led to the
next button.
Let's keep on minimum as he gets 15 y so that we can run our application on almost hundred percent of
the devices running on in the wall.
That's on the next button.
Let's start with the activity.
Let's call the full stop studios may not duty
well under its rules building up project.
So let's wait while the projects built and it's ready to go to use.
Got you.
We need to add a dependency ingredient.
So let's do that first.
So great.
Let's go to the application redo.
So come in here.
Let's out the dependency.
So implementation com that Android not support guard view hyphen re seven on the vision.
So twenty six point one point 0 letting the greater well do the garden view.
So let's begin.
So let's start with the new iPhone.
So coming to our activity mind on example let's get rid of this constraint level let's call it say cleaning
allowed.
OK let's give the orientation as well to go.
So an indication where to go.
Let's get rid of this text to.
Let's start with this scroll mutilate will design multiple cards so that scroll.
OK so scroll view.
Let's give them a much better than height drop content.
The thing about scroll viewers.
It requires only one direct child view.
So let's design a linear low Selina allowed with much better and drop content.
Let's give the orientation a little tickle.
Okay let's design a first card view.
So card you were in March parent height wrap content.
Let's define the layout.
So let's define a linear allowed you so that everything's wrapped up properly.
Selina allowed that much better until I dropped content orientation say vertical let's define a X move
you so text you put much better and I drop content.
Let's define some text and defined X we need a string.
So let's go to our standard example.
So resources values on string dot x.
Let's define a string here.
So let's call it SDR card text.
So let's define in a string so this is a domain code text.
So coming back to our allow file so let's use it here.
So let's do your context let's say the preview let's bring it on the left hand side.
OK.
So as you can see we've got our text you but we can't see any card like structure right.
So let's do that.
So let's define the attributes for our card.
So code corner radius let's give it say 40 B and let's knew at an elevation so elevation say to.
OK.
It doesn't look very clean so let's add some margin and padding.
So let's give it some margin say 10 DP and let's give some padding say then.
OK let's run an obligation and see how it looks
what applications are running.
So let's have a look.
Well as you can see a guard is visible on its face.
This isn't in context so let's add some changes you.
OK let's create another card so let's just copy this let's just close this for a while.
OK let's add an image here.
So image view would match parent say height.
Three hundred DP.
Let's build on.
That's see.
Well I've got an image here so let's use that.
Well let's face it on the JOY folder.
So we've got our image.
So going back to our project.
So let's use.
I see living room tiny.
Let's remove the you.
Let's order another.
So another god view lots just space to two and that's about a combination of image you index to look
much better and tight rock content.
Let's provide the text so as to our context.
Let's run our obligation and have a look.
Our obligations running so let's have a look.
We've got multiple guards here.
The first guard just takes feels that can go on.
We've got an image.
The guard we've got a combination of our image on the decks.
You have got this padding here.
So I guess that's just the image botting.
Well let's not about ground do our main layout so that the guards are more visible now.
So coming to our main exit though let's just do it the background some background on droid color let's
make it light gray again as displayed a hex code here.
OK let's run our obligation again and have a look global obligations running so let's have a look.
Now we've got a light gray background on our guards are more visible now so that's also got you.
You fill it out anyways through the robot government I'm gonna go with my.