1
00:00:00,270 --> 00:00:05,620
Hire everyone in this theater you're going to go ahead and create another Android application.

2
00:00:05,730 --> 00:00:09,960
So we just need to click on this start in your Android studio project.

3
00:00:09,990 --> 00:00:18,390
So here just typing up 9 and you can actually specify a company domain package name and or project location

4
00:00:18,630 --> 00:00:27,370
for your application and then click on next here choose the API 16 Android 4.1 Jelly Bean for our minimum

5
00:00:27,360 --> 00:00:35,430
STK and then click on next here choose plant Blant activity and then click on next on here don't change

6
00:00:35,430 --> 00:00:38,110
anything and click on finish.

7
00:00:38,580 --> 00:00:39,130
OK.

8
00:00:39,270 --> 00:00:39,940
OK.

9
00:00:39,960 --> 00:00:43,160
Now as you can see our project is actually created.

10
00:00:43,590 --> 00:00:51,300
So let's actually did it this hell over text here and then double click on the rest for the here and

11
00:00:51,300 --> 00:00:57,870
then double click on this layout and double double click on this activity main that are examined here

12
00:00:58,320 --> 00:01:02,400
and then choose these floating action button here and then.

13
00:01:02,400 --> 00:01:07,410
So let's actually go back inside this content underline minute example and then double click on this

14
00:01:08,160 --> 00:01:12,320
tab here in order to make this area wider.

15
00:01:12,660 --> 00:01:19,290
And then we can actually dragging some components and drop this out here.

16
00:01:19,290 --> 00:01:24,930
Now let's actually track our linearly out with T-coil into this screen here and then let's actually

17
00:01:24,930 --> 00:01:33,330
put it in the center which of these are relatively out and then actually drag a text field into These

18
00:01:33,410 --> 00:01:35,320
are linearly called vertical OK.

19
00:01:35,460 --> 00:01:41,550
So as you can see here we've got these text fields here and there and it's actually track a plain text

20
00:01:41,550 --> 00:01:43,170
here.

21
00:01:44,010 --> 00:01:50,140
And then let's actually track and our text field and then another text field here.

22
00:01:50,160 --> 00:01:50,750
OK.

23
00:01:51,000 --> 00:01:52,890
So as you can see here click on this.

24
00:01:52,920 --> 00:01:58,790
Our first text you here and the double click on it for the ID you just type in here.

25
00:01:58,800 --> 00:02:02,550
EDT number 1.

26
00:02:02,700 --> 00:02:05,450
Double click on the second to textfield here.

27
00:02:05,700 --> 00:02:07,080
OK.

28
00:02:07,530 --> 00:02:12,060
For the ID just type in here EDT not to.

29
00:02:12,680 --> 00:02:13,360
OK.

30
00:02:13,620 --> 00:02:18,240
Double click on these are textfield here for the ID just type in here.

31
00:02:18,240 --> 00:02:20,890
EDT now three.

32
00:02:20,940 --> 00:02:21,850
OK.

33
00:02:22,380 --> 00:02:27,670
So as you can see here we've got free textfield here inside these are linearly out vertical.

34
00:02:27,840 --> 00:02:32,320
Let's actually write another text view into this linearly Ellsworthy call.

35
00:02:32,520 --> 00:02:37,700
So here are this large view here and then put it here.

36
00:02:37,710 --> 00:02:41,540
So let's actually give our margin to this text view.

37
00:02:41,790 --> 00:02:48,010
So just choose this text text view here and here you can actually find the layout margin here.

38
00:02:48,030 --> 00:02:48,670
OK.

39
00:02:48,960 --> 00:02:52,820
And for the I'll just type in here for example number 20.

40
00:02:52,850 --> 00:02:53,480
OK.

41
00:02:53,700 --> 00:03:00,380
And then double click and these are text 3 here and 40 for the text just typing here result.

42
00:03:00,450 --> 00:03:05,520
And for the ID just type in here TXI the result OK.

43
00:03:05,530 --> 00:03:10,240
So as you can see here we've got this text view here.

44
00:03:10,240 --> 00:03:14,690
So let's actually drag a button into this or linearly out vertical.

45
00:03:15,040 --> 00:03:16,720
So let's actually find the bottom.

46
00:03:16,750 --> 00:03:20,790
As you can see here and then put it below these are text.

47
00:03:20,830 --> 00:03:22,380
View here.

48
00:03:22,480 --> 00:03:31,420
Double click on it and for the text just type in here gets the maximum value and for the ID just type

49
00:03:31,420 --> 00:03:37,510
in here PTEN maximum value.

50
00:03:37,690 --> 00:03:38,430
OK.

51
00:03:38,860 --> 00:03:42,960
And let's actually write a text view into this Alania and here.

52
00:03:43,090 --> 00:03:49,350
So just click on these large text view here and then put it up below it is a button here.

53
00:03:49,450 --> 00:03:52,690
Let's actually give march into this text to view here.

54
00:03:52,690 --> 00:03:57,860
So just click this test view and find the left margin here.

55
00:03:57,980 --> 00:04:05,630
Inside these are properties and then give a value to the to the all for example number 20.

56
00:04:06,010 --> 00:04:09,680
And now it's actually double click on these are text view here.

57
00:04:09,940 --> 00:04:11,980
And for the text just typing here.

58
00:04:12,040 --> 00:04:21,700
So your random numbers and the ID just type in here ticks the secure random numbers.

59
00:04:21,820 --> 00:04:22,370
OK.

60
00:04:22,510 --> 00:04:28,330
Let's actually track our button into this linear layout vertical to just click on this button here and

61
00:04:28,330 --> 00:04:29,360
then put it below.

62
00:04:29,350 --> 00:04:30,610
These are takes to you here.

63
00:04:30,610 --> 00:04:31,710
OK.

64
00:04:32,380 --> 00:04:35,440
Double click on it for the text just type in here.

65
00:04:35,440 --> 00:04:46,540
Generate secure random numbers and for the ID just type in here PTEN secure random numbers.

66
00:04:46,540 --> 00:04:49,120
So now our lay out is actually ready.

67
00:04:49,180 --> 00:04:54,460
So let's actually go back inside this main activity our job right here and then delete these lines of

68
00:04:54,460 --> 00:05:02,500
code here that are actually related to the Options menu and delete this block of code here which is

69
00:05:02,500 --> 00:05:06,040
actually related to the to the floating action button here.

70
00:05:06,700 --> 00:05:10,300
And now we can actually put in our own codes inside this method.

71
00:05:10,420 --> 00:05:11,520
Ok everyone.

72
00:05:11,530 --> 00:05:15,050
Now let's actually create some objects here.

73
00:05:15,370 --> 00:05:19,970
So just typing here any text OK.

74
00:05:20,250 --> 00:05:23,090
And then for the name of this object just typing here.

75
00:05:23,100 --> 00:05:26,650
EDT number 1 assignment operator.

76
00:05:26,880 --> 00:05:31,220
And then let's actually cast this object to our it is a text object.

77
00:05:31,270 --> 00:05:32,150
OK.

78
00:05:32,350 --> 00:05:38,240
Find view by ID are thought Id thought it the number one.

79
00:05:38,310 --> 00:05:38,980
OK.

80
00:05:39,240 --> 00:05:42,190
Let's actually create another editrix object.

81
00:05:42,210 --> 00:05:46,310
EDT Nahm 2 assignment operator.

82
00:05:46,350 --> 00:05:49,980
Now we need to cast this object to an added text object.

83
00:05:49,980 --> 00:06:02,050
Find you by id r that Id dot EDT to edit text it ity Nahm 3.

84
00:06:02,060 --> 00:06:10,560
Assignment operator the text find you by id r that Id dot EDT.

85
00:06:10,620 --> 00:06:11,680
Number three.

86
00:06:11,740 --> 00:06:18,470
OK so now let's actually create a button here.

87
00:06:18,600 --> 00:06:20,640
So just type in here button.

88
00:06:21,400 --> 00:06:31,500
Ok PTEN gets maximum assignment operator and then actually has this object to our button object.

89
00:06:31,590 --> 00:06:39,450
Find if your BY ID or that Id that's between maximum value.

90
00:06:39,460 --> 00:06:43,300
OK so now let's actually create a text you object takes view.

91
00:06:43,680 --> 00:06:53,770
And for the name of this object just type in here TXI the result assignment operator.

92
00:06:54,140 --> 00:07:00,600
And then let's actually cast this object to our text view object find you by ID or that ID that T x

93
00:07:00,770 --> 00:07:07,960
The result is actually create another button here.

94
00:07:09,070 --> 00:07:19,170
But in between secure random number OK and then let's actually put an assignment operator here.

95
00:07:19,470 --> 00:07:25,340
So here we need to actually test this object to about an object pattern find view by ID.

96
00:07:25,400 --> 00:07:29,800
Our thoughts are the dots between secure random numbers.

97
00:07:29,820 --> 00:07:30,730
OK.

98
00:07:31,110 --> 00:07:37,530
So let's actually create another text your object takes to view the extreme secure random numbers and

99
00:07:37,530 --> 00:07:40,290
then actually put in an assignment operator here.

100
00:07:40,320 --> 00:07:48,070
So we need to actually test this object to a text view object find view by id r that Id dot the X the

101
00:07:48,450 --> 00:07:50,060
secure random numbers.

102
00:07:50,270 --> 00:07:51,070
OK.

103
00:07:51,660 --> 00:07:53,570
So hopefully that makes sense.

104
00:07:53,940 --> 00:07:55,370
And let's actually.

105
00:07:55,440 --> 00:07:56,200
OK everyone.

106
00:07:56,200 --> 00:08:02,390
Now let's actually make the Spartan and Unkrich listener to the clique's that the user make on this

107
00:08:02,410 --> 00:08:04,400
button as you can see this is the button.

108
00:08:04,710 --> 00:08:07,940
So let's actually make this button on click listener.

109
00:08:07,980 --> 00:08:10,200
So just refer to the name of this button.

110
00:08:10,270 --> 00:08:13,690
Pythian get maximum that certain click listener.

111
00:08:14,400 --> 00:08:21,110
OK new view unclick listener and that insight is Uncle Fred.

112
00:08:21,120 --> 00:08:23,500
We can actually put our own quotes.

113
00:08:23,520 --> 00:08:24,620
OK.

114
00:08:25,590 --> 00:08:29,220
So now let's actually typing some more quotes.

115
00:08:29,230 --> 00:08:35,680
Now I want to actually read the values that the user entered on these textfield.

116
00:08:35,700 --> 00:08:36,350
OK.

117
00:08:36,870 --> 00:08:45,180
So in order to read the values that the user enter on these tapes use I can't just create a double variable

118
00:08:45,500 --> 00:08:46,800
double.

119
00:08:47,130 --> 00:08:49,920
Now one assignment operator.

120
00:08:50,220 --> 00:09:00,180
And then I can just refer to the name of this EDT not one dot text dot two string.

121
00:09:00,680 --> 00:09:01,170
OK.

122
00:09:01,170 --> 00:09:03,300
So as you can see here it's now showing us an error.

123
00:09:03,300 --> 00:09:07,910
So let's actually hover our mouse pointer over this error area and see what's the error.

124
00:09:08,130 --> 00:09:13,790
Incompatible types require double found job that Lancastrian.

125
00:09:13,980 --> 00:09:19,140
So as you can see here we specified that the data type of this variable is double.

126
00:09:19,140 --> 00:09:19,950
OK.

127
00:09:20,400 --> 00:09:26,380
And now we are assigning a value of type string to this variable.

128
00:09:26,670 --> 00:09:34,280
So in order to actually eliminate this error we need to convert this string value to our double value.

129
00:09:34,530 --> 00:09:36,360
So I can just type in here double.

130
00:09:36,470 --> 00:09:37,050
OK.

131
00:09:37,360 --> 00:09:40,090
That part's double.

132
00:09:40,890 --> 00:09:45,260
And then we can just put this piece of code inside the prentices.

133
00:09:45,270 --> 00:09:47,370
Now as you can see the error is gone.

134
00:09:47,370 --> 00:09:54,880
Here I am just putting this piece of code here in order to convert this string value to a double value.

135
00:09:55,020 --> 00:09:58,950
And then I am actually assigning that value to this double variable.

