1
00:00:00,600 --> 00:00:05,730
That was the reason that we needed to actually cast this object to our putten object in order to let

2
00:00:05,730 --> 00:00:08,780
the compiler know that we are actually faring.

3
00:00:09,000 --> 00:00:09,810
But an object.

4
00:00:09,830 --> 00:00:12,460
OK not a view object or a text you object.

5
00:00:12,480 --> 00:00:13,260
OK.

6
00:00:13,260 --> 00:00:19,780
So here I want to actually specify that whenever we actually click on the spot in here something happens.

7
00:00:19,800 --> 00:00:20,400
OK.

8
00:00:20,640 --> 00:00:23,760
So I need to actually let this button know.

9
00:00:23,790 --> 00:00:30,660
So I want to actually let this button know that when ever a user clicked on this button it's going to

10
00:00:30,660 --> 00:00:33,440
actually respond by doing something.

11
00:00:33,480 --> 00:00:34,070
OK.

12
00:00:34,290 --> 00:00:39,070
So inside the main activity that Java I just need to refer to the name of this button here.

13
00:00:39,250 --> 00:00:43,760
That said unclick listener.

14
00:00:44,110 --> 00:00:51,150
OK here I am actually setting this object this button to actually listen to the clicks that we actually

15
00:00:51,930 --> 00:00:53,910
make on the spot in here.

16
00:00:53,910 --> 00:00:54,530
OK.

17
00:00:54,630 --> 00:00:58,820
So whenever I click on this button it's going to actually listen to that click OK.

18
00:00:59,010 --> 00:01:09,720
So between go that certain click listener knew OK view that unclick listener.

19
00:01:10,280 --> 00:01:15,630
OK so as you can see here it created these lines of code for us.

20
00:01:15,830 --> 00:01:16,590
OK.

21
00:01:17,090 --> 00:01:22,470
So here we are specifying that when ever a button is clicked.

22
00:01:22,700 --> 00:01:26,460
The lines of code inside these unclick is going to be executed.

23
00:01:26,480 --> 00:01:31,210
OK I'll talk more about these lines of code later.

24
00:01:31,390 --> 00:01:31,870
OK.

25
00:01:31,910 --> 00:01:36,720
But for now you just need to know that here are these lines of code.

26
00:01:36,720 --> 00:01:43,070
We are actually specifying that this button is going to listen to the clicks that we make to the clicks

27
00:01:44,000 --> 00:01:46,880
that a user make on that button.

28
00:01:46,880 --> 00:01:47,330
OK.

29
00:01:47,330 --> 00:01:55,700
So inside the Smurfette I can just typing t XTi resolved that said text.

30
00:01:55,700 --> 00:01:58,900
And that inside Apprentice's I can just put typing something.

31
00:01:58,930 --> 00:02:04,510
Ok for example button clicked OK.

32
00:02:04,580 --> 00:02:07,670
So now let's actually run our project and see what happens.

33
00:02:08,030 --> 00:02:08,520
OK.

34
00:02:08,600 --> 00:02:13,440
So as you can see here now our app is running on this emulator here.

35
00:02:13,850 --> 00:02:17,380
And as you can see here this is the result takes you here.

36
00:02:17,390 --> 00:02:18,060
OK.

37
00:02:18,470 --> 00:02:23,370
So now if you just click on the school button here let's see what happens.

38
00:02:23,570 --> 00:02:26,360
As you can see the text of this text is changed.

39
00:02:26,510 --> 00:02:34,790
Button clicked OK and now for example I can actually change this value to another value or whatever

40
00:02:34,790 --> 00:02:37,110
value that I want in the later tutorials.

41
00:02:37,250 --> 00:02:44,570
I'll talk more about our listeners and other materials related to this pattern here.

42
00:02:44,600 --> 00:02:45,330
OK.

43
00:02:45,750 --> 00:02:49,790
So I think it's enough for this application.

44
00:02:49,980 --> 00:02:53,540
And if you have any questions please post the discussion in the course.

45
00:02:53,600 --> 00:02:56,010
I'll do my best to answer your questions.

46
00:02:56,120 --> 00:03:00,800
And thanks very much for watching and I'll see you in the next tutorial.

