1
00:00:00,480 --> 00:00:08,190
So in order to actually or to import they require classes to our job or Foyles we need to actually click

2
00:00:08,190 --> 00:00:09,650
on this android studio.

3
00:00:09,750 --> 00:00:15,080
If you are using the Android studio on a Windows machine you need to actually click on file and then

4
00:00:15,090 --> 00:00:15,590
settings.

5
00:00:15,620 --> 00:00:23,040
OK so if you are using the Android studio on a Mac or a six unit you click on this android studio and

6
00:00:23,040 --> 00:00:31,740
preferences and then just click on these gentled here and then click on auto gameport and then actually

7
00:00:31,740 --> 00:00:36,860
change this in 0 to imports and paste to all.

8
00:00:37,470 --> 00:00:42,580
And then check these checkboxes here OK and then click on OK.

9
00:00:42,600 --> 00:00:50,190
So as you can see here now are the text of your class is imported to our main activity the java file

10
00:00:50,190 --> 00:00:50,500
here.

11
00:00:50,520 --> 00:00:52,780
As you can see now there is no error.

12
00:00:52,800 --> 00:00:59,860
So now if we want to actually change the text of this text through here will your code.

13
00:01:00,060 --> 00:01:01,420
I just need to type in here.

14
00:01:01,650 --> 00:01:05,760
The one that said text.

15
00:01:05,760 --> 00:01:10,470
And then I can actually put into double quotes and then inside the double quotes I can actually put

16
00:01:10,470 --> 00:01:11,400
in my own text.

17
00:01:11,400 --> 00:01:16,090
For example my own text.

18
00:01:16,160 --> 00:01:17,030
OK.

19
00:01:17,250 --> 00:01:20,680
And if I get on my project now and then I need to actually click on this.

20
00:01:20,700 --> 00:01:21,870
OK here.

21
00:01:21,870 --> 00:01:24,900
So as you can see here it's now going to actually start our application.

22
00:01:24,900 --> 00:01:28,360
OK so as you can see here this is our text my own text.

23
00:01:28,410 --> 00:01:29,000
OK.

24
00:01:29,220 --> 00:01:37,020
So here I actually changed the text of this text through here via java code.

25
00:01:37,120 --> 00:01:37,850
OK.

26
00:01:37,930 --> 00:01:41,770
I guess I managed to successfully change the text of that text view here.

27
00:01:41,790 --> 00:01:42,590
OK.

28
00:01:42,630 --> 00:01:43,320
OK.

29
00:01:43,410 --> 00:01:50,380
Now you want to actually show your and other a predefined class in Java called estrange tokenizer.

30
00:01:50,640 --> 00:01:53,380
So first let me actually put in another text view.

31
00:01:53,460 --> 00:01:55,240
Inside this screen here.

32
00:01:55,290 --> 00:02:03,150
So just drag a large takes you to this screen here and here I need to actually give this text through

33
00:02:03,600 --> 00:02:04,440
an ID.

34
00:02:04,440 --> 00:02:05,010
OK.

35
00:02:05,160 --> 00:02:11,830
So here I can I try to change the ID of these takes you to another value for example the two.

36
00:02:11,920 --> 00:02:12,530
OK.

37
00:02:12,690 --> 00:02:21,060
And now are inside this main activity that Java class I need to actually create another text view object.

38
00:02:21,060 --> 00:02:21,660
OK.

39
00:02:21,960 --> 00:02:26,710
So here I need to refer to the name of the text view class.

40
00:02:26,840 --> 00:02:27,750
OK.

41
00:02:28,380 --> 00:02:33,620
And then again I need to give this object a name t t to.

42
00:02:33,840 --> 00:02:40,910
And then I need to put in an assignment operator here and then I need to put in a pair of round brackets.

43
00:02:41,070 --> 00:02:44,170
And then again I need to refer to the name of the text class.

44
00:02:44,190 --> 00:02:46,690
So as you can see here this is called casting.

45
00:02:46,740 --> 00:02:47,250
OK.

46
00:02:47,280 --> 00:02:52,060
In the next tutorial I'll talk more about casting in Java.

47
00:02:52,290 --> 00:02:58,390
But for now just remember that you need to actually cast this object to text view object.

48
00:02:58,410 --> 00:02:59,060
OK.

49
00:02:59,130 --> 00:03:06,600
And make sure that you actually put this casting here and then we need to actually type in here find

50
00:03:07,890 --> 00:03:19,310
view by id and then inside Apprentice's I need to type in our DOT ID that t t to.

51
00:03:19,700 --> 00:03:20,400
OK.

52
00:03:20,580 --> 00:03:23,590
And then I need to put in a semicolon at the end of my statement.

53
00:03:23,610 --> 00:03:28,670
So now as you can see I created an object from this text to your class.

54
00:03:28,680 --> 00:03:34,210
OK so this is how you actually create an object from this text view class.

55
00:03:34,230 --> 00:03:34,750
OK.

56
00:03:34,950 --> 00:03:41,400
So as you can see here this is how you can actually create an object from this text view class here.

57
00:03:41,400 --> 00:03:50,070
OK so now that I created an object for this test class called T X2 I want to actually show you an other

58
00:03:50,070 --> 00:03:53,600
predefined class in Java called Strange tokenizer.

59
00:03:53,850 --> 00:03:56,270
So first I need to refer to the name of this train.

60
00:03:56,400 --> 00:03:57,760
Tokenizer.

61
00:03:58,080 --> 00:04:01,200
And then I need to give a name to this object.

62
00:04:01,200 --> 00:04:06,480
For example for example Esti are object 1.

63
00:04:06,750 --> 00:04:13,700
And then I need to put in an assignment operator here and then I need to put the new keyboard.

64
00:04:14,190 --> 00:04:17,710
And then again I need to refer to the name of this string tokenizer class.

65
00:04:17,730 --> 00:04:18,270
OK.

66
00:04:18,390 --> 00:04:21,200
And then I need to put in a semi-colon at the end of my statement.

67
00:04:21,330 --> 00:04:25,040
So as you can see here it's now showing us an error as you can see here.

68
00:04:25,330 --> 00:04:29,310
When it's actually passing a string object to this constructor here.

69
00:04:29,360 --> 00:04:33,430
OK so first we need to actually create a string object.

70
00:04:33,440 --> 00:04:38,390
Strange for example as of one.

71
00:04:38,640 --> 00:04:44,360
And then I need to put in an assignment operator and then I can initialize this object for example of

72
00:04:44,370 --> 00:04:46,440
value some value.

73
00:04:46,440 --> 00:04:47,060
OK.

74
00:04:47,310 --> 00:04:49,920
And then I need to put in a semi-colon at the end of my statement.

75
00:04:49,920 --> 00:04:50,480
OK.

76
00:04:50,550 --> 00:04:56,260
So inside this prentices I can just refer to the name of this as the r object here.

77
00:04:56,460 --> 00:05:03,290
And now you want to actually change the value of these textfield here by actually adding some Java codes

78
00:05:03,320 --> 00:05:05,570
inside this main activity that Java fight.

79
00:05:05,570 --> 00:05:06,030
OK.

80
00:05:06,080 --> 00:05:14,400
So first I need to actually be to the name of this object here TXI the two dot said text and then inside

81
00:05:14,400 --> 00:05:17,500
the prentices I can actually put in my own text.

82
00:05:17,630 --> 00:05:24,860
So inside these practices I can just refer to the name of this Esty are object 1.

83
00:05:25,280 --> 00:05:25,770
OK.

84
00:05:25,790 --> 00:05:27,960
Dot next.

85
00:05:28,510 --> 00:05:29,330
OK.

86
00:05:29,720 --> 00:05:33,700
And if I write on my project now let's see what happens.

87
00:05:33,710 --> 00:05:39,680
You can actually check this checkbox here that says Use same device for future launches and then it's

88
00:05:39,680 --> 00:05:44,690
going to actually automatically run your project when whenever you want to run your Android project.

89
00:05:44,690 --> 00:05:46,980
OK I can actually see the result.

90
00:05:47,090 --> 00:05:48,190
OK Sam.

91
00:05:48,500 --> 00:05:52,110
So as you can see here it's now showing us this text here some.

92
00:05:52,120 --> 00:05:54,880
So where is this value here for here.

93
00:05:54,890 --> 00:05:59,130
First of all I actually created another object from this text through class.

94
00:05:59,150 --> 00:05:59,660
OK.

95
00:05:59,780 --> 00:06:03,820
And here I actually created an object from this string class.

96
00:06:03,830 --> 00:06:04,140
OK.

97
00:06:04,140 --> 00:06:08,670
And I actually assigned a value to this string object.

98
00:06:08,690 --> 00:06:09,150
OK.

99
00:06:09,260 --> 00:06:15,860
And here as you can see I actually created an object from this string tokenizer class.

100
00:06:15,980 --> 00:06:20,160
This is string tokenizer class is a predefined class in Java.

101
00:06:20,320 --> 00:06:20,860
OK.

102
00:06:21,050 --> 00:06:22,320
So as you can see here.

103
00:06:22,400 --> 00:06:29,250
First of all I referred to the name of the string tokenizer class and then you gave a name to this object.

104
00:06:29,270 --> 00:06:31,200
Is the R object one.

105
00:06:31,220 --> 00:06:36,550
I actually used this new key word here in order to instantiate this object.

106
00:06:36,740 --> 00:06:42,740
And again I referred to the name of this string tokenizer class and inside Apprentice's I've referred

107
00:06:42,830 --> 00:06:45,400
to the name of this Esti are of one object.

108
00:06:45,410 --> 00:06:45,890
OK.

109
00:06:46,010 --> 00:06:53,390
The constructor of this strange tokenizer class accepts a value of type as 3.

110
00:06:53,420 --> 00:06:53,960
OK.

111
00:06:54,020 --> 00:07:01,170
And here I actually decided to change the text of this t XTi to object as you can see here.

112
00:07:01,490 --> 00:07:05,790
And if I double click on this tab here you can see this text here.

113
00:07:05,840 --> 00:07:06,800
OK.

114
00:07:07,490 --> 00:07:14,240
I actually decided to change the value of that text here and I referred to the the name of this object

115
00:07:14,240 --> 00:07:14,800
here.

116
00:07:15,010 --> 00:07:22,280
Tastee to that set text and inside Apprentice's first of all I referred to the name of this object as

117
00:07:22,280 --> 00:07:25,270
the object one dot next tawkin.

118
00:07:25,430 --> 00:07:25,820
OK.

119
00:07:25,820 --> 00:07:29,680
And it actually outputted this value here.

120
00:07:29,960 --> 00:07:31,610
OK so what's going on here.

121
00:07:31,610 --> 00:07:38,090
They created an object from this as three tokenizer class called Esti are object 1.

122
00:07:38,150 --> 00:07:38,870
OK.

123
00:07:39,260 --> 00:07:47,030
And here I actually instantiated this object by using this new keyboard here and I referred to the name

124
00:07:47,030 --> 00:07:49,020
of this string tokenizer class here.

125
00:07:49,040 --> 00:07:53,570
And I actually passed an argument to this constructor here.

126
00:07:53,600 --> 00:07:57,680
OK so the type of this argument is as strange as you can see here.

127
00:07:57,680 --> 00:07:58,070
OK.

128
00:07:58,100 --> 00:08:04,980
So here this construct here uses the default delimiters which are blank spaces.

129
00:08:05,060 --> 00:08:06,690
Papps new lines.

130
00:08:06,770 --> 00:08:09,950
Carriage returns or forefeet characters.

131
00:08:09,950 --> 00:08:18,540
OK so if any of these characters is contained in this thread and it is used to divide this three in.

132
00:08:18,560 --> 00:08:19,100
OK.

133
00:08:19,160 --> 00:08:22,850
So as you can see here we used this space character here.

134
00:08:22,850 --> 00:08:25,250
OK some space value.

135
00:08:25,490 --> 00:08:26,080
OK.

136
00:08:26,180 --> 00:08:29,790
So that's why you only see this takes some here.

137
00:08:29,840 --> 00:08:30,580
OK.

138
00:08:30,830 --> 00:08:39,980
And if you for example want to change the value of this text here I just need to type in here t XTi

139
00:08:40,100 --> 00:08:45,210
one dot set text and it inside Apprentice's.

140
00:08:45,230 --> 00:08:50,690
I just need to refer it to the name of this is the object one dot next token.

141
00:08:50,990 --> 00:08:54,040
And if I put on my project now let's see what happens.

142
00:08:55,670 --> 00:08:59,950
So as you can say this is our value here are some value.

143
00:09:00,200 --> 00:09:00,720
OK.

144
00:09:00,890 --> 00:09:03,080
So now let me repeat again.

145
00:09:03,230 --> 00:09:09,420
We created an object from this as thrain tokenizer class called Esti are object 1.

146
00:09:09,560 --> 00:09:14,270
And here I instantiated this object by using this new keyboard here.

147
00:09:14,570 --> 00:09:22,790
And here I referred to the name of this string tokenizer class and I passed an argument to this constructor

148
00:09:22,820 --> 00:09:25,430
here and arguments to this constructor here.

149
00:09:25,580 --> 00:09:28,780
So the type of this argument is strange OK.

150
00:09:28,970 --> 00:09:30,300
The are one.

151
00:09:30,430 --> 00:09:30,990
OK.

152
00:09:31,070 --> 00:09:38,620
And here the value of this Esti or one object as you can see is some space value as you can see here.

153
00:09:38,770 --> 00:09:39,370
OK.

154
00:09:39,560 --> 00:09:49,100
So here this constructor here uses the default delimiters which are blank spaces Papps or new lines.

155
00:09:49,100 --> 00:09:49,880
OK.

156
00:09:50,090 --> 00:09:52,790
So as you can see here we have a blank space here.

157
00:09:52,820 --> 00:09:53,200
OK.

158
00:09:53,210 --> 00:09:56,960
So that's why we only see this text here Sam.

159
00:09:57,170 --> 00:09:59,750
And here we see this taste here right.

160
00:09:59,750 --> 00:10:00,420
You ok.

