1
00:00:00,300 --> 00:00:02,500
Hello this is Martez or Corti.

2
00:00:02,520 --> 00:00:10,740
And in this tutorial you're going to inflate the float view and lay out that exemplified on the screen

3
00:00:10,990 --> 00:00:13,590
or tape you're going to inflate that widget on the screen.

4
00:00:13,590 --> 00:00:14,850
So let's see how we can do that.

5
00:00:14,850 --> 00:00:19,150
First of all inside is fluting View service class.

6
00:00:19,160 --> 00:00:23,340
We need to create an instance variable of type view.

7
00:00:23,460 --> 00:00:33,070
So just like in here private of type view and its name is going to be floating widget or floating view.

8
00:00:33,150 --> 00:00:39,690
It doesn't really matter floating widgets semicolon here we just declare this variable.

9
00:00:39,780 --> 00:00:44,960
Now we need to override the uncreate method inside this routine.

10
00:00:45,000 --> 00:00:51,990
You say it is class so that we can initialize this floating view floating widget.

11
00:00:52,040 --> 00:00:58,070
So let's just dive in here and create and then the auto complete feature of Andrex suit you helps us

12
00:00:58,520 --> 00:01:00,650
to choose the Smurfit.

13
00:01:00,800 --> 00:01:05,940
So as you can see this method is also inside this service class.

14
00:01:05,990 --> 00:01:12,260
So if I hold out the Comanche I then click on the service here you can see now if I search for the uncreate

15
00:01:12,260 --> 00:01:14,800
method here it is young create Meffert.

16
00:01:14,800 --> 00:01:19,880
It is called by the system where the service is first created.

17
00:01:19,880 --> 00:01:23,690
So we must actually overwrite this method.

18
00:01:23,690 --> 00:01:32,060
Inside are a floating View service that extends from asset class so that when the service is created

19
00:01:32,150 --> 00:01:36,860
it is called and it says Do not call the Smurfette directly.

20
00:01:36,880 --> 00:01:37,360
OK.

21
00:01:37,490 --> 00:01:41,980
We are just overriding this move and we do not call this method inside our service.

22
00:01:42,080 --> 00:01:48,230
So let's close this service that a while and here inside is plotting a news service class.

23
00:01:48,380 --> 00:01:50,530
Let's go inside this uncreate method.

24
00:01:50,780 --> 00:01:58,440
And after this superdad uncreate I can't say floating Vittert assignment operator I can't say lay out

25
00:01:58,490 --> 00:02:02,180
inflator dart from.

26
00:02:02,530 --> 00:02:04,840
So here we need to pass the context.

27
00:02:04,870 --> 00:02:10,240
The context is this service is floating views service is going to be the contex such of statement here

28
00:02:10,480 --> 00:02:11,050
floating.

29
00:02:11,060 --> 00:02:13,470
And we start this.

30
00:02:13,900 --> 00:02:14,570
Okay.

31
00:02:14,770 --> 00:02:20,580
And then we're going to see that inflate.

32
00:02:20,630 --> 00:02:28,720
So now you're going to refer to our float on the line view on the land lay out that XML file there we

33
00:02:28,730 --> 00:02:30,940
created our widget right.

34
00:02:30,980 --> 00:02:46,540
So I can say are that lay out dot float on the Lake View underlying lay out as another argument to this

35
00:02:46,580 --> 00:02:47,430
inflate my.

36
00:02:47,440 --> 00:02:53,650
So I just put a comma here and I just pass gnarl as the value of the second argument.

37
00:02:53,720 --> 00:02:54,460
It is the route.

38
00:02:54,490 --> 00:02:58,530
So we do not want to specify the route the route is already specified.

39
00:02:58,750 --> 00:03:00,280
So if we pass Knol here.

40
00:03:00,520 --> 00:03:02,890
So let me create a new line.

41
00:03:02,930 --> 00:03:05,570
You can see this one better here.

42
00:03:05,620 --> 00:03:08,070
Just let me leave you what we've done here.

43
00:03:08,110 --> 00:03:14,530
We just created an instance variable of a view floating widget inside the uncreate if it be initialized

44
00:03:14,580 --> 00:03:18,180
this a variable of type Musavi said floating widget.

45
00:03:18,250 --> 00:03:22,020
Assignment operator here you are inflating this widget on the screen.

46
00:03:22,030 --> 00:03:28,140
So we say lay out inflator that from floating View service that this as the context that inflate are

47
00:03:28,150 --> 00:03:33,920
not lay out that float Otherland view that lay out and then as the second argument we pass no.

48
00:03:34,060 --> 00:03:40,960
So that's it that's enough for the city Oriol in the next tutorial we are going to create the window

49
00:03:40,960 --> 00:03:47,410
manager inside our floating youth service class and then we are going to add this floating widget to

50
00:03:47,410 --> 00:03:48,540
the window manager.

51
00:03:48,660 --> 00:03:49,330
OK.

52
00:03:49,420 --> 00:03:54,510
So thank you very much for watching and I look forward to seeing you in the next material.

