So we’re going to learn how to how to implement that on android behind the scenes we’re going to learn some complex programming concepts or at least intermediate level programming concepts like hash maps and um how we access how we access elements from a hashmap how we put elements in a hashmap um then how we devise the algorithm for figuring out if there’s a winning combination on the board so how do you figure out when someone has one so we’re going to think about that very basic but this is the way of thinking is something new and then we’re going to talk delve into some slightly advanced coding concepts so also we’re actually going to start doing our xml code so far all our layouts has we have used the design editor now we’re going to slowly sync our feet just a little bit into uh writing our code in writing building a layout in xml so a couple of brief things xml the full form is extensible markup language so xml is very similar to html.
But it’s just a more lightweight and bundled down version of it so it’s not as heavyweight as html both of like both of these they use the concept of tags which we are going to heavily use in our layouts so without any further ado let us see how we are going to uh build our app so yes uh also this time we have implemented excessive amount of starter code and solution code so that way it will be much easier for all of you to follow along so open a new actually new project from version control and git so if you are already open at your android 3d project you can go to new project from version control and then git so i’ll click that and now it will ask you a url so uh i believe udesh has has pasted the link if not you can just go to github and search my name let me go in the guest video hit her so all this code is on github so at any point you can download it to search my name rohan go and go to users so my name then users and this is the first one.
So you can click on this and here you should find so under repositories it should be the first one because it’s the latest one so it’s this one the tic-tac-toe game so you can open it in a new tab or whatever basically we need this when you open this the link that you guys must have put out in the description click on code and then click on this link here this url here this is how we’re going to clone our github repository on our local system so now once you’ve copied that paste it here and now it will clone it to our system we’ll just choose a folder of your choice so let me just see if this is the folder that we want yeah this is the correct folder so i click cancel this is right and then clone so now it should open it in a new yes so i’m going to click new window and what i mean your project is yeah it’s time to get ready now and even if you don’t get all tick marks as long as you don’t get any you know explicit uh crosses you’re fine so this grid out thing is fine and as usual.
Yeah we’re doing this for three weeks now so i’ve i know the things is the size the text size let’s increase it to something bigger that people usually say that they can see much here with 14 and 18 so yeah this is ready and now if you notice on the bottom right where it says git master so here is where you’re going to choose which branch you want to do you want to work on so branches even if you don’t want to go into the jargon of git basically branches you can just think of it like um what stage of your project you want to build build on so here if you see we have included uh one like a demo starter code master is the solution code then we’ve divided each of the starter code into multiple steps so step one start a starter and solution step two start and solution so that way we have divided it into very small charts and i’m confident that you’ll love.
It it is it’s really organized pretty well so on if you’re on the master branch by default you’ll be on master so remote means all the branches that are there on github so currently it has only downloaded the master on your system so if you look at the usual things like app java main activity you see all this code is already written for us because this is the solution code and if you see on app res layout main activity so you might have been in the design editor design pane here so if you look something like this you see the app is done but now we want to do like start from the beginning so head over to get and head over to starter code so when you click on this and check out as and put the same name in starter code so then what it does is so let this complete oh so this says oh so this is disappeared not a problem we’ll fix that this there’s a reason why that’s happening.
We’ll fix that but anyway this was the first starter code is just a demo um and also i forgot to mention you can always put in questions on the youtube chat section or if it’s on on twitter i believe then on the twitter chat section and this will let me know when there’s a question and i’ll answer it cool so here is a demo of a property called layout weight this is what we want to use in our app today so before we even begin our app we’re going to do a demo on this layout underscore weight so to slowly start to understand xml code let us head over click on this click somewhere else to remove it good so far we’ve just been building our layouts in the design editor so if you are a design editor so now we’re going to see the xml code.
That’s written behind the scenes for us by clicking on this text pane so now in the text pane you see all this code that was written behind the scenes for us but now we are actually going to edit the actual xml world so earlier what used to happen is is to use your drag and drop in the design pane this is like a gui a drag and drop graphical user interface and to change some attributes to click on this and change it here this is good but it’s not for um the easiest way actually it seems anti-included but the easiest way is to go in the text pane and do it in xml so we’re going to do that now so it looks overwhelming at first don’t worry we’re going to go over it in kind in some detail um so to explain what how this this xml is structured let us head out back to our slides so we can see that so now as we mentioned before.