1
00:00:00,200 --> 00:00:04,920
Hire everyone in this theater you are really going to go ahead and create another Android application.

2
00:00:04,920 --> 00:00:05,880
So just click on this.

3
00:00:05,910 --> 00:00:11,710
Start on your Android studio project here and then for the application name just type in your app 52

4
00:00:12,180 --> 00:00:21,470
and then click on next year and then he had to choose a 16 Android 4.1 Jelly Bean for minimum STK clicker.

5
00:00:21,480 --> 00:00:26,440
Next he heads to his blench activity next and then click on finish.

6
00:00:26,520 --> 00:00:32,110
So here selectees hello work takes you here and in person delete key on your keyboard and then double

7
00:00:32,130 --> 00:00:33,500
click on the rest folder.

8
00:00:33,660 --> 00:00:39,480
Lay out activity underline that example and then choose this flicking action button and then press on

9
00:00:39,630 --> 00:00:40,760
delete key on your keyboard.

10
00:00:40,790 --> 00:00:47,010
OK so now let's get you to go back and say this our content underline minute example and then here we

11
00:00:47,010 --> 00:00:50,340
need to actually design the user interface of our application.

12
00:00:50,340 --> 00:00:55,760
Now let's actually track our linearly out vertical here as you can see selectees linearly aesthetical

13
00:00:55,950 --> 00:01:02,610
and put it at the center of this relatively here and now let's actually drag a large text view here

14
00:01:02,640 --> 00:01:06,500
at the center of this linearly and vertical double click on it.

15
00:01:06,750 --> 00:01:15,570
And here are delete the text of the stakes for you and for the ID just type in here TXI the value and

16
00:01:15,570 --> 00:01:17,760
then press on and to the key on your keyboard.

17
00:01:17,850 --> 00:01:18,410
OK.

18
00:01:18,690 --> 00:01:20,660
And now let's actually track.

19
00:01:21,180 --> 00:01:24,760
Actually a text field into this linearly alphabetical.

20
00:01:24,780 --> 00:01:29,840
So as you can see here inside these takes real fall there you have lots of text fields here.

21
00:01:29,910 --> 00:01:30,480
OK.

22
00:01:30,600 --> 00:01:35,110
So I just select this plain text field here and put it below.

23
00:01:35,150 --> 00:01:38,690
This takes you and insight is linearly elsewhere stickle here.

24
00:01:38,730 --> 00:01:39,360
OK.

25
00:01:39,600 --> 00:01:46,830
And double click on it and for the ID just type in here EDT value and then person enter key on your

26
00:01:46,830 --> 00:01:53,350
keyboard and then lets actually direct and autocomplete it takes you into this linearly outworks the

27
00:01:53,350 --> 00:01:53,760
call.

28
00:01:53,790 --> 00:01:59,790
So as you can see here are inside this expert folder as you can see we have an auto complete text view

29
00:01:59,790 --> 00:02:00,190
here.

30
00:02:00,240 --> 00:02:00,770
OK.

31
00:02:00,930 --> 00:02:06,270
So just select this takes view and put it up with this edit text.

32
00:02:06,320 --> 00:02:08,070
Here are the stakes real here.

33
00:02:08,190 --> 00:02:08,800
OK.

34
00:02:09,060 --> 00:02:13,740
And double click on it deletes the text of this takes all the complete text view.

35
00:02:14,070 --> 00:02:17,040
And for the OED or just leave this idea as default.

36
00:02:17,040 --> 00:02:17,460
OK.

37
00:02:17,540 --> 00:02:23,790
Well to a complete text and then press on and to key on your keyboard and then let's actually do like

38
00:02:24,000 --> 00:02:30,270
a multi autocomplete takes you into these linearly aesthetical so put it at the center of this linearly

39
00:02:30,270 --> 00:02:36,220
outwards call up double clicking on it deletes the takes of these takes and leave the ID as as default.

40
00:02:36,240 --> 00:02:38,630
Ok multi or to complete text.

41
00:02:38,650 --> 00:02:39,070
OK.

42
00:02:39,120 --> 00:02:40,520
Now let's actually go back inside.

43
00:02:40,560 --> 00:02:45,540
Inside this main activity that have a fight here and then it's actually delete these lines of code that

44
00:02:45,540 --> 00:02:48,410
are related to the Options menu.

45
00:02:48,510 --> 00:02:49,060
OK.

46
00:02:49,350 --> 00:02:53,970
And then as I actually did delete these are lines of code that are related with a floating action button

47
00:02:54,120 --> 00:02:54,710
here.

48
00:02:54,940 --> 00:02:55,390
OK.

49
00:02:55,440 --> 00:02:57,670
Now we can actually put in our own code here.

50
00:02:57,810 --> 00:02:58,200
OK.

51
00:02:58,200 --> 00:03:03,000
So now inside of this main activity class I'm going to actually pasting some lines of code and then

52
00:03:03,000 --> 00:03:04,970
I'm going to explain to you what's going on here.

53
00:03:05,220 --> 00:03:08,510
So as you can see here these are the lines of code that they actually paste that here.

54
00:03:08,520 --> 00:03:14,370
So first about in line 13 I actually declared an object of type text view and the name of this object

55
00:03:14,370 --> 00:03:17,370
is the value here in line 14.

56
00:03:17,430 --> 00:03:23,300
I declared an object of type edit edit text as you can see and the name of this object is it is the

57
00:03:23,310 --> 00:03:30,900
value and in line 15 I actually are declared an object of type or to a complete text view and the name

58
00:03:30,900 --> 00:03:33,160
of this object is autocomplete text.

59
00:03:33,180 --> 00:03:33,640
OK.

60
00:03:33,750 --> 00:03:41,940
And 16 I actually declared another object of type T or to accomplish takes view and the name of this

61
00:03:41,940 --> 00:03:44,790
object is Motti or to complete text view OK.

62
00:03:44,970 --> 00:03:50,320
And in a second I am going to actually explain to you how we can actually use these two new objects.

63
00:03:50,340 --> 00:03:53,050
OK I'm going to explain to you how we can use these objects.

64
00:03:53,050 --> 00:03:53,380
OK.

65
00:03:53,490 --> 00:04:00,690
So first of all are we going to actually instantiate these objects that we actually declared inside

66
00:04:00,690 --> 00:04:02,090
of this main activity class.

67
00:04:02,190 --> 00:04:04,710
OK so inside of this uncreate a moped.

68
00:04:04,800 --> 00:04:07,150
I'm going to instantiate these objects.

69
00:04:07,290 --> 00:04:11,820
So now I'm going to paste in some lines of code and then I'm going to explain to you what's going on

70
00:04:11,820 --> 00:04:12,380
here.

71
00:04:12,660 --> 00:04:15,940
So as you can see here these are the lines of code that they actually pasted here.

72
00:04:16,110 --> 00:04:22,350
And first of all in line 26 I actually instantiated this takes the value objects that I actually create

73
00:04:22,680 --> 00:04:28,610
created in line 15 and inline 26 inside of this uncreate Meffert instantiating this object.

74
00:04:28,620 --> 00:04:34,290
So as you can see here I am referring to the name of this ID or that Id 30 x the value at inline 27

75
00:04:34,710 --> 00:04:41,520
I am instantiating this as it takes object find view by id r that ID that it is the value and in line

76
00:04:41,520 --> 00:04:45,580
28 instantiating this autocomplete takes object.

77
00:04:45,780 --> 00:04:52,410
And here as you can see I am referring to the name of this ID are the ID that or to copy text view and

78
00:04:52,450 --> 00:04:57,160
11:29 by instantiating this Motti autocomplete takes view.

79
00:04:57,260 --> 00:05:02,620
And as you can see here I am referring to the name of the ID art that idea that multi autocomplete takes

80
00:05:02,620 --> 00:05:02,860
to you.

81
00:05:02,860 --> 00:05:03,460
OK.

82
00:05:03,730 --> 00:05:05,070
So hopefully that makes sense.

83
00:05:05,110 --> 00:05:09,520
So now I'm going to actually pasting two lines of code here and then I'm going to explain to you what's

84
00:05:09,520 --> 00:05:10,640
going on here.

85
00:05:10,660 --> 00:05:13,570
So as you can see here I pasted these lines of code here.

86
00:05:13,570 --> 00:05:18,450
First of all in line festively I want to actually set some text to these TXI the value object.

87
00:05:18,460 --> 00:05:22,370
So I just revert to the name of this object DXP value that set text.

88
00:05:22,480 --> 00:05:23,180
Awesome.

89
00:05:23,320 --> 00:05:23,790
OK.

90
00:05:23,920 --> 00:05:30,520
And he had a line of metaphor I want to actually change the background color of this text the value

91
00:05:30,790 --> 00:05:31,870
object as you can see here.

92
00:05:31,870 --> 00:05:36,870
So I just referred to the name of this object TXI the value that said background color color that's

93
00:05:36,880 --> 00:05:37,380
blue.

94
00:05:37,570 --> 00:05:38,140
OK.

95
00:05:38,410 --> 00:05:41,770
And now let's actually run our project and see what happens.

96
00:05:41,770 --> 00:05:45,170
So as you can see our application is running on this emulator.

97
00:05:45,250 --> 00:05:48,180
And as you can see here the text of these takes is awesome.

98
00:05:48,280 --> 00:05:48,740
OK.

99
00:05:48,910 --> 00:05:51,440
And the background color of this text is blue.

100
00:05:51,550 --> 00:05:51,990
OK.

101
00:05:52,120 --> 00:05:56,480
And as you can see here this is our text and this is our autocomplete takes few.

102
00:05:56,590 --> 00:05:58,910
And this is our multi overcomplicates.

103
00:05:58,960 --> 00:06:03,530
Later in the story actually explain to you how we can use these to our text use here.

104
00:06:03,550 --> 00:06:06,930
This autocomplete takes few and these multi are too complex.

105
00:06:07,000 --> 00:06:07,610
OK.

106
00:06:07,930 --> 00:06:11,400
So let's actually to go back inside this main activity the java file here.

107
00:06:11,800 --> 00:06:17,680
And now I'm going to make these make these itx the value object a listener.

108
00:06:17,890 --> 00:06:18,380
OK.

109
00:06:18,610 --> 00:06:24,090
So here I can just type in TXI the value that's set on a click listener.

110
00:06:24,580 --> 00:06:25,140
OK.

111
00:06:25,300 --> 00:06:28,770
And here I need to actually put it into context.

112
00:06:28,780 --> 00:06:29,230
OK.

113
00:06:29,440 --> 00:06:34,370
So here I just need to put in the class that would be the listener.

114
00:06:34,530 --> 00:06:35,000
OK.

115
00:06:35,200 --> 00:06:40,330
So here I just want to make this DXi value object the listener and inside Apprentice's of this set up

116
00:06:40,370 --> 00:06:46,030
like this in an effort I need to specify that the class that is actually a listener to these are click

117
00:06:46,030 --> 00:06:49,050
through the clicks that you use and make on this RTX the body object.

118
00:06:49,080 --> 00:06:54,640
OK so here I can just typing main activity class that this.

119
00:06:55,090 --> 00:06:55,880
OK.

120
00:06:56,260 --> 00:06:59,120
And here as you can see it's now showing us an error.

121
00:06:59,140 --> 00:07:08,880
So here we need to actually implement this interface implement our view that unclick listener.

122
00:07:09,080 --> 00:07:11,410
OK so this is actually an interface.

123
00:07:11,440 --> 00:07:18,620
OK and here we need to actually implement the abstract method that we actually inherit from this interface.

124
00:07:18,640 --> 00:07:18,980
OK.

125
00:07:19,090 --> 00:07:24,920
So class mean activity must either be declared abstract or implement an abstract method on a college

126
00:07:25,070 --> 00:07:25,450
view.

127
00:07:25,480 --> 00:07:26,280
In unclick listen.

128
00:07:26,310 --> 00:07:33,130
OK so here after the Indian calibrates of this uncreate Mefford I just need to overwrite that the Anklage

129
00:07:33,130 --> 00:07:33,770
method.

130
00:07:33,970 --> 00:07:34,270
OK.

131
00:07:34,270 --> 00:07:34,900
Unclick.

132
00:07:34,960 --> 00:07:40,260
And as you can see here now I am actually overwriting this uncle Moffit that we actually inherit from

133
00:07:40,280 --> 00:07:41,260
Rambis interface.

134
00:07:41,290 --> 00:07:46,870
So there is actually an is a relationship between these main activity class and this view that unclick

135
00:07:46,870 --> 00:07:48,140
listener interface.

136
00:07:48,160 --> 00:07:48,870
OK.

137
00:07:49,060 --> 00:07:52,880
So now I just make this RTX the value object the listener.

138
00:07:52,890 --> 00:07:55,030
And now as you can see the error is gone.

139
00:07:55,270 --> 00:07:55,720
OK.

140
00:07:55,720 --> 00:08:06,030
And now inside of this method I can just type in the value that sets takes the color text color.

141
00:08:06,760 --> 00:08:13,450
And here inside the parenthesis I can just revert to the name of the color class color dots for example

142
00:08:13,450 --> 00:08:14,140
right.

143
00:08:14,560 --> 00:08:15,180
OK.

144
00:08:15,460 --> 00:08:18,410
And let's actually run our project and see what happens.

145
00:08:18,790 --> 00:08:22,510
So as you can see here our application is running on this emulator.

146
00:08:22,660 --> 00:08:27,280
And now if I actually click on this text view here let's see what happens.

147
00:08:27,300 --> 00:08:33,940
OK so now as you can see the column of a text view actually change the key the color of this text is

148
00:08:33,940 --> 00:08:35,300
actually to change to let.

149
00:08:35,470 --> 00:08:39,260
OK so that's because of execution of this line of code.

150
00:08:39,260 --> 00:08:40,770
Here inside this unclear method.

151
00:08:40,780 --> 00:08:41,260
OK.

152
00:08:41,320 --> 00:08:46,900
So as you can see here I made these takes the value object a listener to the clicks of the user.

153
00:08:46,900 --> 00:08:47,560
OK.

154
00:08:47,920 --> 00:08:49,480
So hopefully that makes sense.

155
00:08:49,480 --> 00:08:54,810
So now I want to actually also make these it is you value object as you can see here.

156
00:08:54,820 --> 00:08:55,530
This is of type.

157
00:08:55,540 --> 00:08:56,530
It detects the Cape.

158
00:08:56,680 --> 00:09:00,370
I want to make this object a listener or to the clicks of the user.

159
00:09:00,370 --> 00:09:05,670
So here I can just say EDT value that said Uncle listener.

160
00:09:06,010 --> 00:09:06,630
OK.

161
00:09:06,850 --> 00:09:10,100
And here inside Apprentice's I need to actually specify the context.

162
00:09:10,120 --> 00:09:10,690
OK.

163
00:09:10,690 --> 00:09:12,580
So here I am just typing this.

164
00:09:12,640 --> 00:09:13,050
OK.

165
00:09:13,060 --> 00:09:15,240
This refers to the name of this class.

166
00:09:15,400 --> 00:09:16,250
OK.

167
00:09:16,580 --> 00:09:19,840
And or I could actually just type in here.

168
00:09:19,840 --> 00:09:24,080
Main main activity dot this.

169
00:09:24,210 --> 00:09:24,760
OK.

170
00:09:24,940 --> 00:09:26,390
It doesn't make any difference.

171
00:09:26,770 --> 00:09:33,080
And now as you can see I already implemented this a view that unclick listener interface in sight of

172
00:09:33,100 --> 00:09:33,740
this class.

173
00:09:33,790 --> 00:09:34,270
OK.

174
00:09:34,390 --> 00:09:43,380
And I also are overrated this ugly method but how we can actually differentiate between these two listeners.

175
00:09:43,390 --> 00:09:43,850
OK.

176
00:09:43,930 --> 00:09:48,110
We have we actually made this tax the value object.

177
00:09:48,220 --> 00:09:49,850
A listener to the clicks of the user.

178
00:09:49,990 --> 00:09:54,830
And we also mateys EDT value object a listener to the class of the user.

179
00:09:54,850 --> 00:10:00,630
So here as you can see the view class is actually the superclass all the user interface components it

180
00:10:00,650 --> 00:10:01,080
ends right.

181
00:10:01,110 --> 00:10:01,520
OK.

