The app consists of 2 parts, one is the layout or the UI and second, the functionality. The layout is defined in an xml file. Below is the main.xml file code for my TicTacToe application.
The layout structure is similar to html if you see, you have tables, buttons, labels, textfields at your disposal.
The functionality is defined in java language. Below are the contents of my java file.
onCreate() is a function that is called when app starts so you can mark you entry point there. setContentView() lets you set one of the layouts available. findViewById() is used to map the elements in the xml to objects in java (for eg. buttons).
These two components are integrated in a way that allows cross access to resources.
Download the TicTacToe Android source here and the TicTacToe Android application package here.