Android Development: Casino Strategy v1.0
Maybe it's because I'm listening to The Lean Startup, but I decided to create a minimum viable product (MVP) as the first version of my app. I went with the simplest idea that still had some value, displaying a Blackjack strategy card for use in a casino. The goal was to quickly get a feel for Java, Eclipse, and the Android API.
After running through the Hello, World tutorial, I created a simple app with one Activity. The layout was just an ImageView that displayed a png
file I had on my computer.
Next, I created a strategy card in Excel and used Paint.NET to save it as a png
file. I followed the first part of the Notepad tutorial to learn how to insert a menu. It's used to display an AlertDialog with a key showing how to read the card.
At about this point, I decided to install git to start version controlling my app so I could quickly revert any changes I didn't like. I also moved my Eclipse workspace to my Dropbox folder both for backup and so I could work on it from multiple computers.
Now that my code was protected, I added another AlertDialog with a list to allow the user to select different strategy cards. The method below is called from a new case
in onOptionItemSelected()
.
I wanted to be able to swipe between the cards, but instead of adding that extra scope to my MVP, I made a note to investigate it for v2.0. After creating the second card with Excel/Paint.NET, I was ready to publish!