1 00:00:00,386 --> 00:00:03,180 ‫Instructor: Hi, within this lecture we are going 2 00:00:03,180 --> 00:00:05,760 ‫to bring in XML files 3 00:00:05,760 --> 00:00:08,910 ‫and we are also going to bring in the menu file. 4 00:00:08,910 --> 00:00:11,370 ‫Okay, remember the menu? 5 00:00:11,370 --> 00:00:14,790 ‫So when I hit the three dot button 6 00:00:14,790 --> 00:00:19,410 ‫on my right upper corner of my app, it let me add a Tweet. 7 00:00:19,410 --> 00:00:22,200 ‫So this is the menu that I'm talking about. 8 00:00:22,200 --> 00:00:23,460 ‫So in order to do that 9 00:00:23,460 --> 00:00:26,250 ‫we have to bring that file in as well. 10 00:00:26,250 --> 00:00:30,217 ‫So make sure you go to resources and menu folder. 11 00:00:30,217 --> 00:00:32,820 ‫So as you can see, I have a menu folder 12 00:00:32,820 --> 00:00:37,260 ‫and I have an XML over here called Options Menu. 13 00:00:37,260 --> 00:00:39,810 ‫So we need to bring in this as well. 14 00:00:39,810 --> 00:00:43,110 ‫So make sure you go to res file over here. 15 00:00:43,110 --> 00:00:47,910 ‫Okay, and say, right click new, directory. 16 00:00:47,910 --> 00:00:49,590 ‫So when you open this directory 17 00:00:49,590 --> 00:00:54,590 ‫you have to write menu exactly like this, M E N U 18 00:00:54,660 --> 00:00:59,660 ‫and hit okay, so don't use any other characters over here. 19 00:01:00,180 --> 00:01:03,330 ‫You have to code this M E N U. 20 00:01:03,330 --> 00:01:06,870 ‫So when you do that, it'll appear on the left hand side 21 00:01:06,870 --> 00:01:10,260 ‫and you can create a new menu resource file. 22 00:01:10,260 --> 00:01:13,680 ‫As you can see now it displays menu resource file 23 00:01:13,680 --> 00:01:16,825 ‫because menu folder is actually recognized 24 00:01:16,825 --> 00:01:19,140 ‫by the Android studio. 25 00:01:19,140 --> 00:01:22,380 ‫It's only contains menu XML files. 26 00:01:22,380 --> 00:01:25,440 ‫So if you create a new one, you can just come 27 00:01:25,440 --> 00:01:29,700 ‫over here to options menu dot xml and start copying 28 00:01:29,700 --> 00:01:33,990 ‫and pasting content from GitHub to your project. 29 00:01:33,990 --> 00:01:35,340 ‫Okay? 30 00:01:35,340 --> 00:01:38,670 ‫And if you wonder why we are doing this 31 00:01:38,670 --> 00:01:40,270 ‫so maybe you think that 32 00:01:40,270 --> 00:01:44,550 ‫why don't you give us an APK and we can work on that? 33 00:01:44,550 --> 00:01:45,810 ‫Yeah, in order to do that 34 00:01:45,810 --> 00:01:49,680 ‫I have to have a running fire base on my server. 35 00:01:49,680 --> 00:01:51,930 ‫And if one of you hacks it 36 00:01:51,930 --> 00:01:54,782 ‫then the others won't be able to read the data. 37 00:01:54,782 --> 00:01:59,089 ‫If one of you deletes every data in that fire base database 38 00:01:59,089 --> 00:02:01,772 ‫the others won't be able to practice. 39 00:02:01,772 --> 00:02:06,330 ‫So what I'm trying to do is to let you create 40 00:02:06,330 --> 00:02:08,160 ‫your own fire based database 41 00:02:08,160 --> 00:02:11,608 ‫so you can do whatever test you may want to. 42 00:02:11,608 --> 00:02:15,945 ‫Of course, in real life example, in a real life scenario 43 00:02:15,945 --> 00:02:19,140 ‫you won't even have to know the source code. 44 00:02:19,140 --> 00:02:22,007 ‫You can just start working on the APK. 45 00:02:22,007 --> 00:02:25,320 ‫But this time we are building our own APK so 46 00:02:25,320 --> 00:02:27,984 ‫that we can hack our own application. 47 00:02:27,984 --> 00:02:32,984 ‫Okay? So that's why we are doing all of this stuff. 48 00:02:33,060 --> 00:02:35,580 ‫So let's start with the options menu. 49 00:02:35,580 --> 00:02:37,110 ‫Just click on that 50 00:02:37,110 --> 00:02:39,930 ‫and you will see the options menu XML. 51 00:02:39,930 --> 00:02:44,610 ‫You can just copy everything from here like that, okay? 52 00:02:44,610 --> 00:02:49,080 ‫And make sure you get everything inside this box. 53 00:02:49,080 --> 00:02:52,975 ‫And then I'm gonna come over to this text tab 54 00:02:52,975 --> 00:02:57,270 ‫and I'm going to delete everything in the options menu. 55 00:02:57,270 --> 00:02:59,550 ‫Make sure you're in the options menu. 56 00:02:59,550 --> 00:03:01,590 ‫Make sure you open the text tab 57 00:03:01,590 --> 00:03:05,010 ‫and delete everything and paste what you have copied. 58 00:03:05,010 --> 00:03:08,160 ‫Once you do that, you will see add a Tweet 59 00:03:08,160 --> 00:03:12,540 ‫and sign out buttons appear on the right hand site. 60 00:03:12,540 --> 00:03:15,600 ‫So now let's move on with the others. 61 00:03:15,600 --> 00:03:20,020 ‫Let's come over here to resources 62 00:03:20,020 --> 00:03:24,630 ‫and go to layout and start with the recycler row, okay? 63 00:03:24,630 --> 00:03:25,463 ‫As you can see, 64 00:03:25,463 --> 00:03:28,890 ‫I see all the contents regarding the recycler row. 65 00:03:28,890 --> 00:03:31,710 ‫So I'm gonna copy all of this like that. 66 00:03:31,710 --> 00:03:33,390 ‫Everything, okay? 67 00:03:33,390 --> 00:03:36,810 ‫Make sure you get everything and just copy it 68 00:03:36,810 --> 00:03:41,100 ‫and come back to your recycler row and open text. 69 00:03:41,100 --> 00:03:43,320 ‫Then just delete those 70 00:03:43,320 --> 00:03:48,320 ‫and hit command V or control V to paste it. 71 00:03:48,450 --> 00:03:50,397 ‫So let me come over here. 72 00:03:50,397 --> 00:03:54,037 ‫And as you can see in the design section, we don't see much. 73 00:03:54,037 --> 00:03:57,420 ‫You can just say show layout decorations as well. 74 00:03:57,420 --> 00:04:01,380 ‫It won't do much in recycler view row. 75 00:04:01,380 --> 00:04:06,300 ‫Okay? But maybe you may want to open this title bar. 76 00:04:06,300 --> 00:04:07,200 ‫So here you go. 77 00:04:07,200 --> 00:04:09,660 ‫As you can see, we will get the user email 78 00:04:09,660 --> 00:04:12,750 ‫and user Tweet and display them in this row. 79 00:04:12,750 --> 00:04:16,980 ‫And our recycler view, we'll have a lot of rows. 80 00:04:16,980 --> 00:04:19,737 ‫Okay, we'll have as many as we need 81 00:04:19,737 --> 00:04:23,310 ‫and then it'll display all the Tweets. 82 00:04:23,310 --> 00:04:25,980 ‫So let me go to activity Tweet. 83 00:04:25,980 --> 00:04:30,630 ‫So over here I'm going to copy everything, as usual, 84 00:04:30,630 --> 00:04:34,650 ‫and let's come back and go find the text tab 85 00:04:34,650 --> 00:04:37,890 ‫and copy everything and paste it over here. 86 00:04:37,890 --> 00:04:41,880 ‫So this is where we write our Tweet, okay? 87 00:04:41,880 --> 00:04:44,070 ‫And let's go to main. 88 00:04:44,070 --> 00:04:45,510 ‫And here you go. 89 00:04:45,510 --> 00:04:48,363 ‫Let me find the activity main XML 90 00:04:48,363 --> 00:04:53,363 ‫and let me copy and paste everything like that. 91 00:04:54,270 --> 00:04:59,270 ‫So let me try to do it one more time like this and copy it 92 00:05:02,010 --> 00:05:06,693 ‫and then come to the text, delete everything and paste it. 93 00:05:06,693 --> 00:05:07,920 ‫Here you go. 94 00:05:07,920 --> 00:05:12,270 ‫Now we have our sign in and sign up buttons. 95 00:05:12,270 --> 00:05:14,823 ‫And let me go to activity feed. 96 00:05:16,050 --> 00:05:20,790 ‫So let me find activity feed from here as well. 97 00:05:20,790 --> 00:05:22,440 ‫So let's see. 98 00:05:22,440 --> 00:05:24,660 ‫Yeah, this is very neat. 99 00:05:24,660 --> 00:05:25,860 ‫This is very short. 100 00:05:25,860 --> 00:05:30,038 ‫Just copy everything from here and paste over here. 101 00:05:30,038 --> 00:05:33,030 ‫This is very short because all we needed 102 00:05:33,030 --> 00:05:36,000 ‫is a recycler view over here. 103 00:05:36,000 --> 00:05:38,580 ‫It will take the recycler row that we have 104 00:05:38,580 --> 00:05:43,260 ‫created previously, and it, it'll just show the data inside 105 00:05:43,260 --> 00:05:47,520 ‫of that row as many time as we need, okay? 106 00:05:47,520 --> 00:05:50,460 ‫So this is what you need in order 107 00:05:50,460 --> 00:05:52,770 ‫to complete the XML files. 108 00:05:52,770 --> 00:05:57,770 ‫Now we have our menu, we have our XML files, 109 00:05:57,870 --> 00:06:01,140 ‫now we need the Java codes, okay? 110 00:06:01,140 --> 00:06:04,710 ‫And we need the activity codes as well. 111 00:06:04,710 --> 00:06:08,385 ‫So that's what we are going to do within the next lecture. 112 00:06:08,385 --> 00:06:12,330 ‫And make sure you, if you want to see the preview 113 00:06:12,330 --> 00:06:14,550 ‫we can just hit this button, okay? 114 00:06:14,550 --> 00:06:17,160 ‫It isn't very important right now, but 115 00:06:17,160 --> 00:06:20,040 ‫if you want to see, you can come over here and just click 116 00:06:20,040 --> 00:06:24,539 ‫on it in order to see the preview once you are in text tab. 117 00:06:24,539 --> 00:06:27,150 ‫Okay? So that's it. 118 00:06:27,150 --> 00:06:29,823 ‫Let's do the rest within the next lecture.