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.
nice and simple snippet..
ReplyDeletetks a lot!
ReplyDeletethank you a lot!
ReplyDeletehow to share this game and play through bluetooth?
ReplyDeleteHow to make this application played via bluetooth between two devices?
ReplyDeleteThanks :)
ReplyDelete