Sunday, February 12, 2012

Android Tutorial : Tic Tac Toe Part 2


In this part of the tutorial we look at how to setup the strings that we will be using in the app.  In the next part of the series we will begin work on our layout file for our main activity.







Let me know what you think.  As always if you notice an error or something that could be done differently to improve this tutorial let me know.



Files to go with this tutorial:
strings.xml

1:  <?xml version="1.0" encoding="utf-8"?>  
2:  <resources>  
3:    <string name="app_name">TicTacToeTutorial</string>  
4:    <string name="first_human">You go first.</string>  
5:    <string name="turn_human">Your turn.</string>  
6:    <string name="turn_computer">Android\'s turn.</string>  
7:    <string name="result_tie">It\'s a tie!</string>  
8:    <string name="result_human_wins">You Won!</string>  
9:    <string name="result_android_wins">Android Won!</string>  
10:    <string name="one">1</string>  
11:    <string name="two">2</string>  
12:    <string name="three">3</string>  
13:    <string name="four">4</string>  
14:    <string name="five">5</string>  
15:    <string name="six">6</string>  
16:    <string name="seven">7</string>  
17:    <string name="eight">8</string>  
18:    <string name="nine">9</string>  
19:    <string name="info">Info</string>  
20:    <string name="human">Human: </string>  
21:    <string name="ties">Ties: </string>  
22:    <string name="android">Android: </string>  
23:    <string name="contact_heading">Contact Info</string>  
24:    <string name="contact_info">  
25:      <b>Name:</b> Indie Development\n  
26:      <b>Email:</b> my email here\n  
27:      <b>Phone:</b> my phone here\n  
28:      <b>Website:</b> website here  
29:    </string>  
30:    <string name="about_heading">About</string>  
31:    <string name="about_info">This app allows you to play a game  
32:      of tic tac toe against the computer. The rounds  
33:      will rotate who gets to play first. Also, the app  
34:      will keep track and display the result of the games  
35:      at the bottom of the screen.  
36:    </string>  
37:  </resources>  


Check us out on Google+ (Indie Development).
Check us out on our .co site (Indie Development).

No comments:

Post a Comment