1
00:00:00,470 --> 00:00:06,100
Hi everyone in this theater you are really going to go ahead and create an animal Codys application.

2
00:00:06,120 --> 00:00:11,460
So just click on the start in your Android studio project and then for the name of your application

3
00:00:11,580 --> 00:00:18,510
name as you can see here just type in here animal quis as you can see here you can specify the company

4
00:00:18,510 --> 00:00:20,380
domain the package name.

5
00:00:20,460 --> 00:00:22,910
And here you can specify the project location.

6
00:00:23,100 --> 00:00:26,450
And as you can see here we have this include C++ support.

7
00:00:26,490 --> 00:00:31,680
So do not check the sequence here and here click on this next here.

8
00:00:31,710 --> 00:00:37,310
As you can see for the minimum STK choose AP I-24 Android 7 point zero nugget.

9
00:00:37,320 --> 00:00:37,850
OK.

10
00:00:38,130 --> 00:00:44,570
If you have actually higher versions of this android 7 is that OK for me this is Android 7.0.

11
00:00:44,600 --> 00:00:45,300
No good.

12
00:00:45,630 --> 00:00:52,770
And the reason that I want to use Android 7 here for my minimum SDK is that because I want to show you

13
00:00:52,770 --> 00:00:59,880
the newest AP or is that are actually introduced in Android I need to choose the minimum SDK as AP I-24.

14
00:00:59,920 --> 00:01:01,320
Okay this is really important.

15
00:01:01,500 --> 00:01:06,450
And here choose a phone and tablet as the mediumistic or phone and tablet because you want to create

16
00:01:06,660 --> 00:01:09,770
applications for phone and tablet later.

17
00:01:09,850 --> 00:01:16,470
I may actually create courses for creating applications for well devices or TV devices or Also Android

18
00:01:16,500 --> 00:01:17,220
Auto.

19
00:01:17,480 --> 00:01:24,160
So now click on this next here and here here just choose this basic activity here.

20
00:01:24,180 --> 00:01:29,850
As you can see there isn't that I need you to choose the space of your basic activity is that because

21
00:01:29,880 --> 00:01:32,000
in this application I want to introduce you.

22
00:01:32,160 --> 00:01:33,880
There are fragments in Android.

23
00:01:33,990 --> 00:01:41,970
So choose this basic activity because if I actually choose this actually this activity as the model

24
00:01:42,420 --> 00:01:44,800
we actually get a fragment for free.

25
00:01:44,880 --> 00:01:48,030
OK so two is this basic activity and then click next.

26
00:01:48,330 --> 00:01:55,410
And here you can specify the activity name lay out name the title of the activity main activity and

27
00:01:55,410 --> 00:02:00,330
as you can see here we're going to get a menu resource as you can see here so we can specify the name

28
00:02:00,330 --> 00:02:01,570
of the menu resource.

29
00:02:01,650 --> 00:02:05,630
So it's ok menu made and here as you can see it says use affreightment.

30
00:02:05,640 --> 00:02:12,300
So here again because I want to actually introduce you to the concept of fragments in Android you need

31
00:02:12,300 --> 00:02:18,070
to actually check this checkbox here that says Use affreightment and then click on finish.

32
00:02:18,090 --> 00:02:21,340
So now as you can see here our project is created.

33
00:02:21,510 --> 00:02:27,000
So now it's actually double click on the layout folder that is inside this folder and here as you can

34
00:02:27,000 --> 00:02:29,740
see we have this activity underlaid minute example.

35
00:02:29,850 --> 00:02:35,430
So here is the text of this activity so if I click on this design tab here at the bottom.

36
00:02:35,490 --> 00:02:38,730
Now as you can see here you can see the user interface of this activity.

37
00:02:39,060 --> 00:02:45,780
We have this content on the line that means that example as you can see here and we have also this fragment

38
00:02:46,020 --> 00:02:47,600
underlayment that example.

39
00:02:47,850 --> 00:02:52,060
So first of all let's actually double click on this activity underline minute maid of the image here

40
00:02:52,470 --> 00:02:58,550
as you can see we have this activity and now it's actually double click on this activity on the alignment

41
00:02:58,570 --> 00:03:00,600
of the stem and here at the top.

42
00:03:00,960 --> 00:03:06,060
Just in order to make this area abiders just double click on the top here in order to make it make this

43
00:03:06,060 --> 00:03:06,790
area there.

44
00:03:06,960 --> 00:03:09,730
As you can see here again we have this floating in action button.

45
00:03:09,840 --> 00:03:13,110
So are selected and that person delete key on your keyboard.

46
00:03:13,530 --> 00:03:15,970
And here we have this activity.

47
00:03:16,320 --> 00:03:20,430
So let's click on this text tab here at the bottom as you can see here.

48
00:03:20,530 --> 00:03:23,950
Bodily out we have tool bar as you can see here.

49
00:03:24,030 --> 00:03:30,270
And as you can see now you can see if I click on this preview here at the right hand side.

50
00:03:30,390 --> 00:03:34,450
Now you can see that this is actually the upper left right.

51
00:03:34,470 --> 00:03:39,290
So for now we don't wanna actually work on this activity underline made that example.

52
00:03:39,360 --> 00:03:42,540
But I just wanted to show you that we have these codes.

53
00:03:42,720 --> 00:03:44,120
We have this example code.

54
00:03:44,160 --> 00:03:50,730
In order to put some of the basic human interface components inside our of use an end user interface

55
00:03:50,730 --> 00:03:51,880
inside our activity.

56
00:03:52,020 --> 00:03:55,440
So we have this app Amberly out and we have also this tool bar.

57
00:03:55,740 --> 00:03:58,830
So we use them as you can see here at the top.

58
00:03:58,980 --> 00:03:59,690
OK.

59
00:03:59,970 --> 00:04:01,970
For now I'll just leave them here.

60
00:04:02,220 --> 00:04:07,710
And now let's actually go inside this content underline made that example here at the top I have this

61
00:04:08,040 --> 00:04:08,660
tab here.

62
00:04:08,670 --> 00:04:15,000
Just click on it as you can see here we have this user interface such as selectees hello world takes

63
00:04:15,000 --> 00:04:20,490
you here and now as you can see we cannot select this hello world view.

64
00:04:20,510 --> 00:04:30,390
Why again because I chose to use a fragment inside our application I cannot interact directly with this

65
00:04:30,510 --> 00:04:31,990
content content.

66
00:04:32,020 --> 00:04:37,220
Underline that example OK because we have a fragment inside this activity.

67
00:04:37,440 --> 00:04:40,390
So now if I click on this text tap here at the bottom.

68
00:04:40,500 --> 00:04:46,840
Now as you can see here we have actually a block of code that is actually related to the fragment.

69
00:04:46,860 --> 00:04:53,070
We have a fragment as you can see here the name of our block of code here is fragment.

70
00:04:53,070 --> 00:04:56,300
And here we have a manual space as you can see here.

71
00:04:56,640 --> 00:05:03,200
And we have an idea for displacement Android call an ID as you can see here at Sun at same place Id

72
00:05:03,230 --> 00:05:03,940
slash.

73
00:05:03,940 --> 00:05:06,350
This is the idea of this fragment as you can see here.

74
00:05:06,490 --> 00:05:17,710
So let's actually change this idea to animal quizz animal quizz fragment

75
00:05:20,870 --> 00:05:28,070
and here we have a name for displacement camp that example that is a site that that animal Chloes as

76
00:05:28,070 --> 00:05:31,640
you can see here that main activity fragment right.

77
00:05:31,820 --> 00:05:33,290
This is the name.

78
00:05:33,410 --> 00:05:36,430
So here we have ballet outfit.

79
00:05:36,470 --> 00:05:43,310
So again let me point out that the name must be actually different for you because we have a package

80
00:05:43,310 --> 00:05:44,380
name as you can see here.

81
00:05:44,380 --> 00:05:45,840
This is the name of my package.

82
00:05:45,860 --> 00:05:49,250
So this package name is actually different for your application.

83
00:05:49,340 --> 00:05:49,660
OK.

84
00:05:49,700 --> 00:05:55,010
So do not worry if this value is actually different from your right in front of your value of this name

85
00:05:55,010 --> 00:05:59,010
attribute and this name attribute is not really important.

86
00:05:59,020 --> 00:06:01,230
But we put them here as you can see here.

87
00:06:01,370 --> 00:06:05,600
So we have this lay out Viets as you can see which is actually match parent.

88
00:06:05,630 --> 00:06:07,770
We have this lay out white again much parent.

89
00:06:07,770 --> 00:06:10,870
These are fragments right in the right hand side.

90
00:06:10,880 --> 00:06:17,690
Inside this preview again we are actually we have this user interface but we we are shown in a fragment

91
00:06:17,900 --> 00:06:22,970
here we have this fragment inside this content underline minute example.

92
00:06:23,390 --> 00:06:26,920
So now as you can see we have this layout behavior.

93
00:06:27,140 --> 00:06:33,180
So as you can see the lay out his behavior is Android that supports that design that vidiot that app

94
00:06:33,190 --> 00:06:35,440
partly out scrolling view.

95
00:06:35,600 --> 00:06:42,710
So here are just it's not really important just ignore this attribute but just put that put that attribute

96
00:06:42,710 --> 00:06:43,020
here.

97
00:06:43,040 --> 00:06:43,500
OK.

98
00:06:43,690 --> 00:06:46,270
We have so much important things to talk about.

99
00:06:46,280 --> 00:06:51,500
So just ignore this one here and we have a lay out as you can see here tools lay out.

100
00:06:51,500 --> 00:06:52,200
Right.

101
00:06:52,280 --> 00:06:56,300
So the layout is a fragment underline made that example.

102
00:06:56,300 --> 00:07:02,210
So now as you can see if I show you the product structure by just holding the command key on my keyboard

103
00:07:02,240 --> 00:07:04,680
and the number one key on my keyboard.

104
00:07:04,700 --> 00:07:10,500
So if you are using a Windows machine you can actually select you can hold the control on your keyboard

105
00:07:10,580 --> 00:07:16,410
and then Pirzada number one key on your keyboard or you can actually click on the view here at the top

106
00:07:16,490 --> 00:07:21,830
and then tool windows and then click on this project here so that you can see the project structure

107
00:07:21,830 --> 00:07:23,640
here at the left.

108
00:07:23,820 --> 00:07:28,340
And now as you can see if you have this fragment underlayment that is there and so this is the layout

109
00:07:28,370 --> 00:07:30,040
right tools lay out.

110
00:07:30,290 --> 00:07:35,690
And as you can see at St. lay out refers to this layout folder inside this project structure.

111
00:07:35,690 --> 00:07:39,120
And then we can refer to this name fragment underline main.

112
00:07:39,560 --> 00:07:43,840
So now as you can see it is our content underline that they submit right.

113
00:07:43,880 --> 00:07:50,480
So we put this flag on the underlying that example inside this content underlying minute example.

114
00:07:50,510 --> 00:07:51,170
So now.

115
00:07:51,230 --> 00:07:56,850
Because we cannot directly interact with this content underline minute example.

116
00:07:56,960 --> 00:08:02,720
We need to interact with this flagmen and to underline that it mean that a symbol that's the only reason

117
00:08:02,720 --> 00:08:06,630
that we actually want to use fragments in our Android application.

118
00:08:06,650 --> 00:08:10,730
So just click on this fragment underline monetarism in here.

119
00:08:10,760 --> 00:08:15,950
And as you can see here at the top you have this tab name fragment underline minute ASML so just double

120
00:08:15,950 --> 00:08:16,700
click on it.

121
00:08:16,800 --> 00:08:19,770
And now as you can see here this area is now wider.

122
00:08:19,820 --> 00:08:24,500
So at the bottom we have this text tab and we have this design tab so just click on this design tab

123
00:08:24,500 --> 00:08:25,810
here as you can see.

124
00:08:25,850 --> 00:08:29,240
Now if you want to select this hello world view here.

125
00:08:29,330 --> 00:08:31,910
Now I can't select the cell overtakes view.

126
00:08:32,120 --> 00:08:40,310
I can actually interact directly with this hello world you here and in person delete key on your keyboard.

127
00:08:40,370 --> 00:08:46,370
So analysts actually design the user interface our application but before that I want to actually show

128
00:08:46,370 --> 00:08:50,490
you a demo of the application that we are going to build in this lesson.

