1
00:00:00,170 --> 00:00:06,570
Hire everyone in this theater are really going to go ahead and create our first team Android application.

2
00:00:06,570 --> 00:00:08,130
So we just need to click on this.

3
00:00:08,130 --> 00:00:10,350
Start any 100 studio project.

4
00:00:10,500 --> 00:00:17,440
And then here we need to actually assign a name to this application name so just type in here app 15.

5
00:00:17,550 --> 00:00:23,540
And here you can actually specify the company domain package name and project location.

6
00:00:23,730 --> 00:00:33,910
Click next choose API 16 Android 4.1 jellybean for your minimum STK next Blache activity next.

7
00:00:34,110 --> 00:00:36,550
And here don't change anything.

8
00:00:36,570 --> 00:00:37,710
And then click on finish.

9
00:00:37,710 --> 00:00:39,910
Now delete this text view here.

10
00:00:39,930 --> 00:00:40,950
Hello world.

11
00:00:41,220 --> 00:00:47,200
And then double click on the rest folder layout and then click on this activity other learned men are.

12
00:00:47,700 --> 00:00:53,400
And then here select this float in action button here and then press delete key on your keyboard.

13
00:00:53,420 --> 00:00:57,690
OK so let's actually go back and say this content on the line made that example.

14
00:00:57,880 --> 00:01:02,140
And now we need to actually design our user interface here.

15
00:01:02,210 --> 00:01:08,870
OK OK now let's actually drag a linearly out vertical inside this relatively out OK.

16
00:01:09,000 --> 00:01:16,910
Just put this linearly out vertical at the center of the screen and then lets actually drag linearly

17
00:01:16,920 --> 00:01:26,640
out horizontal into this linear left vertical and now drag to large takes views into this linearly out

18
00:01:26,670 --> 00:01:31,650
horizontally k 1 and 2.

19
00:01:32,100 --> 00:01:39,630
Soon as we can see if we have to take our viewers inside this linearly out horizontal OK so just select

20
00:01:40,080 --> 00:01:47,300
these two text views and for the layout we'd just assign the value zero.

21
00:01:48,090 --> 00:01:52,040
And for the left vate assign the value zero point five.

22
00:01:52,560 --> 00:01:58,560
So as you can see here these two values these two text views are actually taking only a half of the

23
00:01:58,560 --> 00:02:02,010
width of these linearly out horizontally k.

24
00:02:02,130 --> 00:02:09,040
We gave the value 0 to the left of each of these two text views and we assign the values 0.5 to the

25
00:02:09,040 --> 00:02:11,210
lay out rate of these two takes use.

26
00:02:11,280 --> 00:02:17,030
So that these two takes views can actually take the half of the linearly out horizontal.

27
00:02:17,170 --> 00:02:19,380
That these two takes use are inside it.

28
00:02:19,410 --> 00:02:23,930
So that's the purpose of actually assigning a value to lay out weight.

29
00:02:24,080 --> 00:02:30,310
OK so so that we can actually position our components relative to other components.

30
00:02:30,330 --> 00:02:32,110
OK so now let's actually.

31
00:02:32,160 --> 00:02:37,240
And are there linearly out horizontal into these linearly out vertical.

32
00:02:37,460 --> 00:02:45,790
OK and as you can see here we have another linearly and horizontal here and then let's drag a linearly

33
00:02:45,790 --> 00:02:49,760
out vertical inside this linearly horizontal.

34
00:02:50,340 --> 00:02:56,980
And let's drag another linearly out vertical inside these linearly horizontal OK.

35
00:02:57,210 --> 00:03:03,900
So as you can see here we have two linear layouts vertical inside of these linearly out horizontal.

36
00:03:03,900 --> 00:03:11,360
OK so now I want to actually drag a large takes you inside these are linearly out.

37
00:03:11,520 --> 00:03:18,300
That is inside of this are linearly out horizontal and lets actually drag another large takes you into

38
00:03:18,300 --> 00:03:24,170
this linearly vertical that is inside of this linearly and horizontally OK.

39
00:03:24,360 --> 00:03:25,420
So just put it here.

40
00:03:25,470 --> 00:03:31,990
So as you can see here I put another takes you inside this linearly out vertical OK.

41
00:03:32,220 --> 00:03:37,460
So just select these two linear layouts and then for the layout.

42
00:03:37,650 --> 00:03:42,870
Assign the value 0 and for the lay out weight assigned a values 0.5.

43
00:03:43,500 --> 00:03:49,130
So as you can see here now these two linear layouts these linearly elsewheres equal and this linearly

44
00:03:49,210 --> 00:03:57,030
with the call are actually taking only half of the weight of these linearly out horizontal that these

45
00:03:57,030 --> 00:03:58,900
ticks views are inside it.

46
00:03:59,010 --> 00:04:04,050
So as you can see here this linearly outward code is actually taking half of the width of this linearly

47
00:04:04,050 --> 00:04:05,410
out is on top.

48
00:04:05,730 --> 00:04:13,860
As you can see here and this linearly out vertical is actually taking a half of the V of these linearly

49
00:04:13,860 --> 00:04:14,760
out horizontal.

50
00:04:14,780 --> 00:04:19,250
Here as you can see and we actually put two text views inside of.

51
00:04:19,260 --> 00:04:21,580
These are linearly have two articles.

52
00:04:21,630 --> 00:04:27,620
So just double click on this text view here that is inside of this linearly I-30 call here.

53
00:04:27,740 --> 00:04:31,750
And for the text I just delete the text of this takes you.

54
00:04:31,980 --> 00:04:35,460
And for the ID just type in here ticks the index

55
00:04:38,010 --> 00:04:38,710
and.

56
00:04:38,880 --> 00:04:46,260
Select these this second text view and for the text delete the text of this text through and for the

57
00:04:46,260 --> 00:04:46,870
ID.

58
00:04:47,010 --> 00:04:51,040
Just typing here takes the value.

59
00:04:51,060 --> 00:04:56,970
OK so now let's actually go back and say this main activity that job of file and then actually delete

60
00:04:57,300 --> 00:04:59,570
these lines of code here that are actually related.

61
00:04:59,700 --> 00:05:06,200
The options menu and here delete this block of code that is actually related to the fluting action.

62
00:05:06,220 --> 00:05:10,810
But OK so now we can actually start coding here.

63
00:05:10,950 --> 00:05:14,820
First of all let's actually create to test view objects.

64
00:05:14,990 --> 00:05:24,970
So Takes Two takes the index to XTi index and then we need to actually put in an assignment operator.

65
00:05:25,170 --> 00:05:34,570
And here we need to cast this object to our text view object find view by id our ID 30 x the index.

66
00:05:34,570 --> 00:05:47,370
OK let's actually create another text view object takes the value text view find view by ID or that

67
00:05:47,430 --> 00:05:49,680
ID that X the right.

68
00:05:49,710 --> 00:05:55,210
OK now let's actually create two string objects strings.

69
00:05:55,720 --> 00:06:04,680
All it takes the index value all it takes the index value here.

70
00:06:04,720 --> 00:06:07,730
I don't actually instantiate this object.

71
00:06:07,840 --> 00:06:12,650
So as you can see here I didn't assign any value to this object to this string object.

72
00:06:12,760 --> 00:06:17,750
So this object inside the memory actually refers to a null value.

73
00:06:17,800 --> 00:06:19,240
So strange.

74
00:06:19,890 --> 00:06:24,340
All it takes the value.

75
00:06:24,920 --> 00:06:26,950
Value OK.

76
00:06:27,120 --> 00:06:30,810
OK so now let's actually create a constant fine on.

77
00:06:31,270 --> 00:06:31,920
OK.

78
00:06:32,260 --> 00:06:40,060
And here I need to specify the data type of y a constant int and I need to actually give a name to my

79
00:06:40,060 --> 00:06:41,010
constant.

80
00:06:41,110 --> 00:06:48,940
So I preferred to actually write my constants names by actually using capital letters.

81
00:06:48,940 --> 00:06:53,660
OK the name of your constant names should be uppercase.

82
00:06:54,010 --> 00:06:58,050
And I think it's a good convention in actually naming your constants.

83
00:06:58,060 --> 00:06:58,660
OK.

84
00:06:59,020 --> 00:07:00,700
So just step in here Len.

85
00:07:01,420 --> 00:07:05,060
Underline of a.

86
00:07:05,460 --> 00:07:06,200
OK.

87
00:07:06,550 --> 00:07:11,680
And then I here assigned a value of 15 to this constant.

88
00:07:11,680 --> 00:07:13,740
Now this actually creates an array.

89
00:07:13,990 --> 00:07:16,740
So the data type of my ARA is float.

90
00:07:16,880 --> 00:07:20,930
I want to actually create an array of floating point numbers.

91
00:07:20,930 --> 00:07:27,610
OK so the data type of My error is flawed and because I want to actually create an array I need to actually

92
00:07:27,610 --> 00:07:31,510
put a pair of brackets after my data type.

93
00:07:31,660 --> 00:07:32,280
OK.

94
00:07:32,620 --> 00:07:35,680
Now I need to actually give a name to my houri.

95
00:07:35,830 --> 00:07:44,890
So just typing here float float numbers array and then put an assignment operator here and here I want

96
00:07:44,890 --> 00:07:46,670
to actually create an array object.

97
00:07:46,690 --> 00:07:49,380
New float.

98
00:07:50,190 --> 00:07:55,810
And inside these brackets I need to actually specify the size of my arii.

99
00:07:55,850 --> 00:08:01,450
So as you can see here I created a constant here LeDuff of Array and I assigned the value 15 to this

100
00:08:02,000 --> 00:08:02,860
constant.

101
00:08:02,870 --> 00:08:08,990
So inside of these brackets I can just refer to the name of this line of array constant here.

102
00:08:09,320 --> 00:08:18,210
So at the size of my array is 15 I can actually assign 15 floating point numbers to disagree.

103
00:08:18,320 --> 00:08:25,250
OK because I did specify that this area is going to actually accept only fifteen point fifteen our floating

104
00:08:25,250 --> 00:08:25,950
point numbers.

105
00:08:25,980 --> 00:08:34,550
OK but as you can see here yet I didn't assign any values to those of empty places that are inside of

106
00:08:34,580 --> 00:08:35,210
this array.

107
00:08:35,210 --> 00:08:38,420
I just specified that the size of this array is 15.

108
00:08:38,420 --> 00:08:42,430
OK so let's actually create a for loop and inside the prentices.

109
00:08:42,430 --> 00:08:47,750
Let's actually create an integer variable int index assignment operator 0.

110
00:08:47,990 --> 00:08:51,890
Here I assigned the value 0 to this index valuable.

111
00:08:52,450 --> 00:08:59,030
And now I need to actually specify the condition in which this loop is going to be executed.

112
00:08:59,040 --> 00:09:01,670
So index less than.

113
00:09:01,910 --> 00:09:04,460
And here I need to refer to the name of this array.

114
00:09:04,460 --> 00:09:12,920
Float numbers are a total and so on until the value of these index variable is less than the value of

115
00:09:12,920 --> 00:09:15,170
the length of this array.

116
00:09:15,170 --> 00:09:17,100
This loop is going to be executed.

117
00:09:17,450 --> 00:09:24,860
So here I just need to take an index plus plus and this piece of code determines of what would be the

118
00:09:24,860 --> 00:09:28,730
value of this index variable every time.

119
00:09:28,730 --> 00:09:32,030
This loop is actually finished executing.

120
00:09:32,090 --> 00:09:38,180
And then it's going to actually check the condition in and then it's going to execute the lines of code

121
00:09:38,180 --> 00:09:40,400
that are actually inside of this loop OK.

122
00:09:40,590 --> 00:09:46,510
OK now you want to actually assign some values to these Arey OK.

123
00:09:46,730 --> 00:09:47,720
The indexes of this.

124
00:09:47,720 --> 00:09:48,110
I have a.

