Hello this is Martez or Corti.
And in this tutorial you're going to inflate the float view and lay out that exemplified on the screen
or tape you're going to inflate that widget on the screen.
So let's see how we can do that.
First of all inside is fluting View service class.
We need to create an instance variable of type view.
So just like in here private of type view and its name is going to be floating widget or floating view.
It doesn't really matter floating widgets semicolon here we just declare this variable.
Now we need to override the uncreate method inside this routine.
You say it is class so that we can initialize this floating view floating widget.
So let's just dive in here and create and then the auto complete feature of Andrex suit you helps us
to choose the Smurfit.
So as you can see this method is also inside this service class.
So if I hold out the Comanche I then click on the service here you can see now if I search for the uncreate
method here it is young create Meffert.
It is called by the system where the service is first created.
So we must actually overwrite this method.
Inside are a floating View service that extends from asset class so that when the service is created
it is called and it says Do not call the Smurfette directly.
OK.
We are just overriding this move and we do not call this method inside our service.
So let's close this service that a while and here inside is plotting a news service class.
Let's go inside this uncreate method.
And after this superdad uncreate I can't say floating Vittert assignment operator I can't say lay out
inflator dart from.
So here we need to pass the context.
The context is this service is floating views service is going to be the contex such of statement here
floating.
And we start this.
Okay.
And then we're going to see that inflate.
So now you're going to refer to our float on the line view on the land lay out that XML file there we
created our widget right.
So I can say are that lay out dot float on the Lake View underlying lay out as another argument to this
inflate my.
So I just put a comma here and I just pass gnarl as the value of the second argument.
It is the route.
So we do not want to specify the route the route is already specified.
So if we pass Knol here.
So let me create a new line.
You can see this one better here.
Just let me leave you what we've done here.
We just created an instance variable of a view floating widget inside the uncreate if it be initialized
this a variable of type Musavi said floating widget.
Assignment operator here you are inflating this widget on the screen.
So we say lay out inflator that from floating View service that this as the context that inflate are
not lay out that float Otherland view that lay out and then as the second argument we pass no.
So that's it that's enough for the city Oriol in the next tutorial we are going to create the window
manager inside our floating youth service class and then we are going to add this floating widget to
the window manager.
OK.
So thank you very much for watching and I look forward to seeing you in the next material.