Mitch wrote:
> I've read a bunch of stuff on the Android developers site (examples,
> docs, etc)...  I still have lots of unanswered questions, especially
> on how to use XML for layouts, but thought I should start putting
> together my first application.  I would really like to create an
> application based on my ideas and not just re-implement someone else's
> ideas.  I was thinking that would give me a better idea on how
> difficult Android is to program.
> 
> I thought for my first application I would create a 3x3 TicTacToe
> game.   Seems simple but the more I work on it the harder it looks to
> do.  I've been trying to use the Gridview example, but not having
> luck.  My ideas for this game are below, I'd appreciate any direction,
> examples, documentation, etc you could give me.  Also, if you think
> TicTacToe is too big of a program to tackle for my first app, comments
> on that are welcome.
> 
> I would like a very graphical game and not just a grid of buttons with
> text.  I think to create a real game people would expect graphics that
> look professional and be able to click directly on the board.  So I
> need to display the X's and O's on top of a # looking grid that is
> equal in height and width.
> 
> I'd like the game to be 2 person.  By this I would want to have 2
> android emulators running and transmitting moves to and from each
> other.  This way 2 people could play over a distance.  It would be
> nice to allow the games to transmit the data without the aid of a
> network if they are physically close to each other (not sure if
> Android can do this).
> 
> It would be best to allow me to draw the graphics (#, O, X) in a
> graphics editor and scale them to the device.  I'd like both landscape
> and portrait mode to work and use any extra space outside the square #
> board to have buttons or text like (Forfeit, Play Again, Score,...).
> I'd rather use XML for the view  layout so I can change it without
> coding.
> 
> It seems this is too difficult for my current skill level, but even if
> I can only do some of it, that would be good too.  I keep trying to
> use Gridview to do my 3 x 3 layout, but I can't figure out how to do
> that.

You have two broad-brush choices for how to build the GUI portion of
this app:

1. Use the 2D graphics API and touch events. If you wish to go that
route, I heartily recommend Ed Burnette's _Hello, Android_, as he works
through creating a Sudoku game using this technique.

2. Use widgets, as you are trying to do. It is possible you will achieve
your goal ("a very graphical game and not just a grid of buttons with
text"), but it might get rather involved to get a specific look. For
example, GridView does not allow you to change the thickness of the
divider lines, which you might feel is important. That would suggest you
might not want to use GridView but rather something else. Off the cuff,
I would try a TableView and draw my own grid lines, with nine ImageViews
for the game-play cells (holding X, O, or being transparent
placeholders). But, then again, I haven't given that a lot of thought.

Generally speaking, you will get better results on this list if you ask
focused, tactical questions. I have some advice I posted on getting
assistance with Android up on AndroidGuys:

http://androidguys.com/?p=5738

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Need help for your Android OSS project? http://wiki.andmob.org/hado

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to