How to Make a Tic Tac Toe Game in Android – Part 1 – THE LAYOUT – Android Studio Tutorial



In this video series we will create an offline 2 player Tic Tac Toe game. We will code the whole game logic, count player points, add a reset functionality and handle orientation changes, so we don’t lose our game state when we rotate the device.

In part 1 we will create the layout by creating 9 buttons within nested LinearLayouts and we will even them out over the screen by adding the layout_weight attribute. Our player points and reset button will be in a RelativeLayout.

Watch the whole playlist:

Source code:

____________________
Subscribe to my channel:

Want more Android tutorials? Check my playlist section:

Follow me on social media:

Facebook:

Instagram:

Twitter:

Blog:

28 Replies to “How to Make a Tic Tac Toe Game in Android – Part 1 – THE LAYOUT – Android Studio Tutorial”

  1. Wolfgang Benfattoum

    Great tut. Will follow it after I finish the Hello Android books Tic Tac Toe. I like the fact youre doing it with the builder next to the editor. Makes more sense for smaller projects. Thanks.

  2. d talmood

    do you think next time you make a tutorial you could explain why you do specific things as for example why we didn't use kotlin support and explain why we deleted "android.support.constraint.constraintLayout" with linear layout.

  3. Guy Gontar

    Very nice video. I tried to follow and code it myself using LinearLayout and Buttons like you did but the Android Studio didn't show the buttons for some reason. Does anyone have any idea why? (After copying your code it did show them :S )

  4. shahjahan

    Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference

    this error iam facing when i run the app and its getting crashed

  5. PETER UKEME

    I love the way you zoom it. pls come up with a tutorial of building chatroom, list of chatroom and a complete signup form, that photo will be at the side, follow by first name,last name, username, genda Num, and sign up

  6. nousernamenow

    I read you're Non technical skills page, very interesting. I doubt I could really ever be a php developer or programmer, but I want to just try some stuff. Recently I was trying to do some basic php login tasks, no luck there with that. Tutorials on this site are poor, i have a couple of books, but they aren't very good for somebody who doesn't know much at all.

    I don't suppose you know any php by any chance?

  7. nousernamenow

    I tried some Android studio tutorial vids, but they never worked out. I am using a Android system from 2013. So I imagine this could work on the device I have access to?

Leave a Reply

Your email address will not be published. Required fields are marked *