# Layout

## Menü

Im Menü soll zuerst nur eine Option verfügbar sein: Ein neues Spiel zu starten. Dafür soll wie im ersten Beispiel ein Button eingefügt werden.

![Hauptmenü Screenshot](http://cdn.jonasotto.com/android-tutorial/tictactoe/menu.png)

> Musterlösung [hier](https://github.com/BZ-Markdorf/Android-Studio-Examples/blob/master/TicTacToe/app/src/main/res/layout/activity_main.xml)

## Spiel

Das TicTacToe Feld soll mit 9 Buttons dargestellt werden. Diese sollen in einem TableLayout angeordnet werden. Ein TableLayout enthält mehrere TableRows, die die einzelnen Elemente (Buttons) enthalten. Zusätzlich soll ein TextView genutzt werden um zu zeigen, welcher Spieler gerade am Zug ist.

![Screenshot Spiel](http://cdn.jonasotto.com/android-tutorial/tictactoe/ingame1.png)

Die Benennung der buttons sollte dem Schema "button\_x\_y" entsprechen, wobei button\_0\_0 oben links ist und button\_2\_0 oben rechts.

> Musterlösung [hier](https://github.com/BZ-Markdorf/Android-Studio-Examples/blob/master/TicTacToe/app/src/main/res/layout/activity_spiel.xml)

## Endbildschirm

Am Ende des Spieles soll der Gewinner angezeigt werden. Außerdem soll der Spieler die Option haben ein neues Spiel zu starten oder zum Menü zurückzukehren.

![](http://cdn.jonasotto.com/android-tutorial/tictactoe/end.png)

> Musterlösung [hier](https://github.com/BZ-Markdorf/Android-Studio-Examples/blob/master/TicTacToe/app/src/main/res/layout/activity_spiel_ende.xml)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ottojo.gitbook.io/android-studio/tictactoe/layout.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
