We'll come back often enough, you have a requirement or you have an idea for a specific feature and
then you try to develop it, and this can take quite some time, depending on how complex the example
is that you want to build.
And in general, how much code will be required to build that.
It often enough makes more sense to not build something yourself, but use a third party, a library
in order to at least use that specific feature.
And that is the beauty that we have nowadays, that there are so many of them.
There are so many different third party libraries.
We just need to use the ones that we need.
We need to import them into our application and to use them accordingly.
And I'm just going to show you one example, which is the circle image for you by age, Dudenhoeffer,
who has built a little third party library, which we can use in order to get these rounded images,
because by default, images look like the one you can see here at the top, which is this image of you.
And then when you want to have a circular image, you then a third party library is the better choice.
Of course, you could go ahead and try to build it yourself, but.
Why should you, if there is a great third party library that you can use and there are third party
libraries for so many different things and very many things are done, very complicated.
Li in Android studio and an Android in general where third party libraries make your life so much easier.
So, for example, he says, in order to use this application, you need of course to have an application.
Right?
Then you need to implement this dependency and then in order to use it, you can use this code in an
XML file.
Of course, there are some limitations and the general what I would highly recommend you to do is to,
of course, also always check out the whole page and the whole examples and everything about a third
party libraries that want to use because maybe there are some problems that can occur or maybe they
just generally have some advice on how to use the third party library.
All right.
So what we need is we need to create a new project.
Then to add this implementation into built up gradle.
An app file, which is when you go to your apps here, gradle scripts, you have this built gradle module
app.
That's the one inside of that file.
You go to dependencies, you have to scroll it a little further down and then you have to add this line
here, which is implementation so and so.
And once you add that, you need to sink your file.
So if I get rid of that, you can see I have this thing now button.
If I add that back in, I now need to go ahead and sink it in order for it to load all of its required
functionality so this can be multiple different classes or just copy whatever the developer has programmed
that we need to use in order to use this functionality that he has developed.
All right.
So once that is done, you can go ahead to your resources and to your layout and then pretty much use.
This little example here, so here, DEA agent, have whole circle in you thought circle image of.
And that is basically what he has given you as, quote, a snippet here.
Only that I have some constraints here at the bottom, and of course, I have another image for you,
an expert compared immature, which is this wide image that we have here at the top of simple image
and Ivy, circular image.
And now, of course, in the code, if you want to use it, you can just go ahead and use this set image
drawable and then say which image you want to use.
And here, contacts, compact, get drawable, then pass the context and the trouble that you want to
use.
And of course, I have this trouble here, which is this image of PMG, which is this Android image.
All right.
At this point, I would recommend you search for third party libraries, for features that you might
want to use in your future applications.
So the idea is that you have yourself or maybe a customer of you requires you to have some functionality
or use some functionality.
Then I would recommend you try to implementor and use its functionality.
Of course, we're going to have multiple examples for this.
We're going to use Google Maps.
We're going to use also texta, which allows us to have an easier job at asking for permissions when
we want to use, for example, the camera or the gallery or the location of the user and so forth.
So there will be plenty of situations where we will touch third party libraries again.
But I would still recommend to check out your own examples and just browse the web for whatever you
can think of and try to implement that.
Just Google for some cool third party libraries and try to get them from GitHub, because in most cases
you will find third party libraries on GitHub.
All right.
So good luck with that and see you in the next video.