1 00:00:00,000 --> 00:00:04,799 [MUSIC] 2 00:00:04,799 --> 00:00:08,930 Before we start changing anything, let's take a brief tour of our tools so we can 3 00:00:08,930 --> 00:00:13,960 get familiar with what's on the screen and where we write code or make changes. 4 00:00:13,960 --> 00:00:17,160 The very first thing we want to do is start our emulator. 5 00:00:17,160 --> 00:00:20,030 You may already have it up and running from the previous stage. 6 00:00:20,030 --> 00:00:22,990 But if you don't, it's a good idea to start it ahead of time, so 7 00:00:22,990 --> 00:00:24,640 it'll be ready when you need it. 8 00:00:24,640 --> 00:00:27,410 Up here in the tool bar are a few Android buttons. 9 00:00:27,410 --> 00:00:31,450 This one with the phone is our Android Virtual Device Manager. 10 00:00:31,450 --> 00:00:35,270 And here just select the virtual device you want to run, and 11 00:00:35,270 --> 00:00:36,270 then click on the Start button. 12 00:00:38,630 --> 00:00:42,610 Once the emulator window appears, we can safely close our Virtual Device Manager. 13 00:00:44,490 --> 00:00:46,610 We don't need to leave it open to use the emulator. 14 00:00:47,610 --> 00:00:51,635 All right, while that's loading, let's take a look at Android Studio. 15 00:00:51,635 --> 00:00:55,170 On the left-hand side, there should be a view for the project structure. 16 00:00:56,190 --> 00:00:58,920 If it's missing or you accidentally close it, what you can do with 17 00:00:58,920 --> 00:01:03,230 this button right here, you can reopen it with this same button. 18 00:01:03,230 --> 00:01:08,600 Or you can either go up to View > Tool Windows > Project. 19 00:01:09,880 --> 00:01:11,820 Or you can go down to the bottom, and 20 00:01:11,820 --> 00:01:15,770 as we saw before, you can select Project or other windows from here. 21 00:01:18,070 --> 00:01:21,050 Also, remember that clicking this icon toggles whether or 22 00:01:21,050 --> 00:01:24,410 not we can see the Tool Window shortcuts around the screen. 23 00:01:24,410 --> 00:01:27,260 The project view is where we can see all the files and 24 00:01:27,260 --> 00:01:29,480 folders that make up our project. 25 00:01:29,480 --> 00:01:34,940 By default, Android Studio displays our project files in the Android Project View. 26 00:01:34,940 --> 00:01:38,550 The Android Project View shows a trimmed down version of your project 27 00:01:38,550 --> 00:01:42,940 that provides quick access to the most important files for Android development. 28 00:01:42,940 --> 00:01:45,670 Let's click here and switch to the Project View. 29 00:01:47,090 --> 00:01:49,860 This view shows our entire project. 30 00:01:49,860 --> 00:01:52,920 Here we can see our FunFacts folder at the top. 31 00:01:52,920 --> 00:01:53,553 Let's expand that. 32 00:01:55,430 --> 00:02:00,258 Also, notice that our FunFacts folder is in our Android Studio Projects folder that 33 00:02:00,258 --> 00:02:03,120 we used when we first created the project. 34 00:02:03,120 --> 00:02:06,076 In fact, if we switch to Finder or Windows Explorer, 35 00:02:06,076 --> 00:02:12,094 we can navigate to our project, And sure enough, 36 00:02:12,094 --> 00:02:16,620 we see that these files and folders match up with what we see over here. 37 00:02:16,620 --> 00:02:20,330 The most important folder in our project is the app folder. 38 00:02:20,330 --> 00:02:24,450 It contains all the resources and raw materials that make up our app. 39 00:02:24,450 --> 00:02:26,480 Let's take a look inside to see how it's structured. 40 00:02:28,580 --> 00:02:32,690 At the top is a build directory which contains all the files that are built for 41 00:02:32,690 --> 00:02:34,390 us by Android Studio. 42 00:02:34,390 --> 00:02:37,780 We shouldn't ever need to change anything in the build directory. 43 00:02:37,780 --> 00:02:41,048 The next one is Libs which is short for Libraries. 44 00:02:41,048 --> 00:02:45,520 It contains any optional libraries of code we might need in our project. 45 00:02:45,520 --> 00:02:47,370 This will be empty for this project but 46 00:02:47,370 --> 00:02:50,520 we'll show more on how to use libraries in later courses. 47 00:02:50,520 --> 00:02:51,969 Next up is SRC. 48 00:02:51,969 --> 00:02:55,013 This is the important directory and it's short for source. 49 00:02:55,013 --> 00:03:00,350 I know source isn't that long of a word, but programmers love abbreviations. 50 00:03:00,350 --> 00:03:04,330 If we expand source, we can see three more folders. 51 00:03:04,330 --> 00:03:08,990 The Android test and test folders are used for different kinds of testing. 52 00:03:08,990 --> 00:03:10,880 But let's save those for later. 53 00:03:10,880 --> 00:03:12,380 We are more concerned with the main folder. 54 00:03:13,620 --> 00:03:16,570 Inside main are all the files we'll be working with. 55 00:03:16,570 --> 00:03:19,020 Java files are placed here in Java folder, 56 00:03:19,020 --> 00:03:23,820 and then below, we have res, which is short for resources. 57 00:03:23,820 --> 00:03:27,510 Resources are everything that we see or hear in an app. 58 00:03:27,510 --> 00:03:31,660 So in addition to images and sounds, it also contains the layout files for 59 00:03:31,660 --> 00:03:33,670 how our screens will be laid out. 60 00:03:33,670 --> 00:03:38,090 If we keep going further, then inside res, we find the layout folder. 61 00:03:39,200 --> 00:03:43,890 And in here is one file named activity_fun_facts.xml. 62 00:03:43,890 --> 00:03:46,090 This is the file that is already opened over here. 63 00:03:47,960 --> 00:03:50,170 That's enough about project structure. 64 00:03:50,170 --> 00:03:51,940 Let's change back to the Android view so 65 00:03:51,940 --> 00:03:55,260 we don't have to do as much digging to find the files we want. 66 00:03:55,260 --> 00:03:57,410 So click up here, and then pick Android. 67 00:03:59,025 --> 00:04:02,980 Great, now over here, this is the main section for writing code, or 68 00:04:02,980 --> 00:04:04,880 designing screen layouts. 69 00:04:04,880 --> 00:04:09,630 We're currently looking at the Design view for the activity_fun_facts layout file. 70 00:04:09,630 --> 00:04:11,090 The Design view is a drag and 71 00:04:11,090 --> 00:04:14,840 drop editor that lets us visually manipulate the screen layout. 72 00:04:14,840 --> 00:04:18,030 In the middle is a preview of how it should look on a device, and 73 00:04:18,030 --> 00:04:21,600 it looks just like what we saw a few minutes ago when we ran the app. 74 00:04:21,600 --> 00:04:24,100 Next to the preview is a blueprint view, 75 00:04:24,100 --> 00:04:27,950 which shows us a little more detail about how all our views are positioned. 76 00:04:27,950 --> 00:04:29,430 When designing screen layouts, 77 00:04:29,430 --> 00:04:33,620 sometimes we want to modify the code directly instead of using the design view. 78 00:04:33,620 --> 00:04:38,530 To modify the XML code, we can just click on the Text tab here at the bottom. 79 00:04:38,530 --> 00:04:42,330 Also, if you've clicked on the Text tab and you're not seeing a preview over here, 80 00:04:42,330 --> 00:04:45,357 you can show and hide the preview by clicking on thisPreview button. 81 00:04:47,620 --> 00:04:50,110 All right, that should be enough to get us started. 82 00:04:50,110 --> 00:04:52,490 In the next video, we'll start making some changes.