‫Narrator: Within this lecture,
‫we are going to create our XML files
‫and create our activities so
‫that we can get a hold of building our Twitter app
‫for Firebase penetration testing.
‫So over here you see my GitHub page.
‫So you will need all these details in my GitHub page,
‫so make sure you open this page.
‫And make sure you download it, if you want.
‫You can copy and paste it after you download it.
‫But, again, I'm just going to take code from here, okay?
‫Since we already have integrated firebase
‫within our own project, it will be a good practice
‫for us to create activities manually
‫one by one, and then add XMLs
‫and add Java codes after all.
‫So that's exactly what I'm going to do.
‫In order to see the structure, I'm going to go into the app
‫and source folders and then go into the main as usual, okay?
‫And under main we have one Java folder
‫and one resources folder.
‫We're going to work with both of those.
‫So I'm going to open this in a new tab, okay?
‫And I'm going to open this secure tweet in here.
‫So over here I have my java files.
‫As you can see, I have three activities
‫and one other Java file, which is not an activity
‫but which is a recycler adapter.
‫I'm going to explain what this does.
‫And over here, we have XML files for both, for activities
‫and for our recycler as well.
‫So what we are gonna do, we are going to create these files
‫from scratch within our Android studio project,
‫and then copy and paste the code
‫so that we can get started building our app, okay?
‫And I have never done this
‫in a real programming course.
‫Now I have never copied and pasted some code
‫but, since this is not a development course,
‫and since I have written this specifically
‫for this course, and to use for penetration testing only,
‫I believe it is not very unorthodox to copy
‫and paste codes and build this app from scratch, okay?
‫So we're going to create these files one by one.
‫And in order to do that, I'm gonna go for Android studio.
‫And I'm going to
‫actually,
‫I already have an activity over here, right?
‫So it's called main activity.
‫Of course, I can keep it this way.
‫I can call this main activity.
‫But in order to be sure, I'm just going to rename this
‫and then add the other activities.
‫As you can see, I don't have any main activity in here.
‫I have other names.
‫So I'm going to stick for the exact names.
‫So I suggest you do that as well.
‫So come over here to refactor, okay?
‫And find rename.
‫And if you do that, it will ask you for a new name.
‫So I'm going to say sign up activity,
‫because this is the activity
‫that we are going to see first, okay?
‫So once you do that,
‫you can just check all these check boxes
‫over here and make sure you hit the refactor.
‫And believe me, you have to write this exactly
‫the same with me, like uppercase, lowercase.
‫Just pay attention to the details.
‫It has to be exactly the same because we are using
‫that in the code that I have written over here, okay?
‫So next thing is we have feed activity
‫and tweet activity.
‫So I'm going to create that, okay?
‫So open your com file over here
‫and say new
‫and go for activity.
‫And you can go for gallery over here
‫and choose empty activity, okay?
‫So make sure you choose the empty activity
‫because we are going to do everything
‫from scratch, including XMLs.
‫So I'm going to name this feed activity
‫and the XML is created as activity feed like that, okay?
‫So here you go, here is our second activity.
‫Now I'm gonna go for the third one, which is tweet activity.
‫Let me add this as well.
‫So let me add a new activity.
‫Say gallery, say empty activity.
‫Come over here and say tweet.
‫Yep, Like this tweet activity.
‫So if you say okay, then it'll be added.
‫And one last thing I believe, let me go for this layout.
‫And here we have feed, tweet,
‫and we have main XML as well.
‫Maybe we may want to change it in order to be consistent,
‫so I'm gonna come over here and say
‫activity,
‫activity sign up, I believe.
‫Yep, like this and say refactor.
‫So here you go.
‫Now it's changed as well.
‫So we are done with the activities, okay?
‫So let me find the codes.
‫As you can see, we have one Java file, which is not
‫an activity, which is an recycler view adapter.
‫So we're going to use a recycler view
‫in order to display the images,
‫not the images, the tweets to the user.
‫And in fact, you can use a recycler view
‫to display images as well in any project, but that's not
‫what we are going to do over here.
‫So in order to connect this with the data source
‫we need something called adapter.
‫And that's what we are going to do.
‫I'm gonna choose Java class from here
‫and called this tweet recycler adapter.
‫So make sure you choose the class as well.
‫And then I'm going to edit
‫and then we are going to discuss how we can
‫copy and paste stuff over here.
‫And in the layout section, Let me come over here.
‫Activity feed, activity main.
‫Yeah, this was called activity main.
‫I didn't change it in the original app as well,
‫but it really doesn't matter.
‫If you want, you can come over here
‫and say refactor, rename, activity main
‫just to be consistent with the original code.
‫When I change it, it changes everything in this project.
‫So it shouldn't be a matter,
‫but I'm going to stick to the original one anyhow.
‫So as you can see, it says R.layout.activity_main
‫in signup activity.
‫Since we change it, it changes everything in the app.
‫So here you go.
‫Now there are three XML files over here for activities,
‫but maybe you actually notice that we have another one
‫over here regarding to our recycler.
‫So if you come over here, you will see recycler row.
‫So that is the row that holds the tweet
‫in our recycler view.
‫So we're going to create another XML file over here
‫and say new layout resource file.
‫So I'm going to call this recycler
‫view, recycler row, actually, underscore row like that.
‫And here you go.
‫Now, it's created for me.
‫Now, I have my draft file, okay?
‫So, I have all the activities,
‫I have all the Java files, I have all the XMLs.
‫So, I can start copying and pasting code
‫from my GitHub page to my original project
‫over here so that I can build it afterwards
‫and start testing if I can hack it.
‫So that's exactly what we are going to do
‫within the next lecture.