teaching machines

Homework 1 – feltonj

September 30, 2011 by . Filed under cs491 mobile, fall 2011, postmortems.

Never again buy flash cards!

FeltonFlash, brought to you by yours truly James Felton, allow you to create your own piles of flash-cards and it carry them with you right in your pocket!

This is the main activity of the application. It displays the name of the pile (top left) the title of the flash card (top center) and an index of what card you are looking at in your pile (top right). On the bottom you cycle through the pile and it wraps around too. The enter answer button will pop up a dialog asking you to enter the text that is on the back of card (viewed by tapping the big area in the middle of the screen) and will display a Toast message saying “Correct” or “Incorrect, try again” when appropriate.

This dialog appears after pressing the “add card” menu button. The other menu buttons are “Pile List” and “Add Pile.” Add pile looks very similar to this dialog but the pile list actually creates a new list activity that displays each pile.

As you can see there is a pile with no name. Due to this I added validation to the create card and create pile dialogs so this won’t happen again, it simply won’t submit and run the proper functions if there is nothing in all or any of the fields.

The piles are stored as text files in the data directory, adding cards appends to the end of the appropriate file.

 

Hope you like my handiwork,

James Felton