I was not able to work on the application for the last few days because I had a little accident with my phone where it fell into some water! During this time, my phone was unusable and working with the Virtual Devices provided to you was just not fun to work with (it’s just too darn slow!). Anyhow, I spent this time thinking about the flash card feature. I decided to re-vamp how users shuffle around cards. The user has the option of going thru each of the flash cards in sequential order or in a random order. I had implemented the sequential order feature but it required too much coding of logic that would catch every case where the user has either choosen to view the cards in either sequential or random order. Although I had successfully implemented the sequential viewing order, it just didn’t feel right. I was not looking forward to coding the logic that dealt with random orders. So I stood back and thought that there must be a better, simpler and elegant way to accomplish this.
My solution to this was to have an array of integers in either sequential or random order. This allowed me to code the logic to traverse thru each flash card by using one simple set of logical steps that would work for both sequential and random! I hesitated doing this because I thought it would be a waste to pass around this array or integers around from each activity to the other. But after I thought about it for a while, this small bit of inefficiency (which is has not really even remotely slowed down the application) is great because now I have implemented this major feature without a big hassle. And if I ever need to troubleshoot this feature (or even enhance it) it’ll be much easier in the future.
In addition to the work I did above, I also made some small changes to the UI. Both the Question and Answer Activity objects now have two arrows that allows the user to navigate back and forth thru each of the questions. I also put a randomize cards menu option to allow users to randomize the cards (see screenshots below).
To view the answer, the user has to tap the text of the question and they’ll see the answer below:
To randomize all cards, the user would need to click on the menu key on their phone and a small options menu comes up:
Once the user randomized the cards, the application generates a new int array with each question number in random order.
Next things to Implement
The next thing I’ll implement will be the ability for users to flag questions so that they can review those questions that they are having problems with. This means that I’ll have to create a new table on the database and play around with this (which should be fun!). This should be the last really big feature before I go back and polish up the interface a bit more and then begin the process of actually releasing the application. Other features will come as I continue to develop the application, below is a small list of the things I’d like to be able to implement for this application:
- Quiz – Allow a user to take a quiz of 10 randomly generated questions. One thing I’d like to do with this feature is to have about 10 wrong answers choosen (along with correct answer(s)) and present this to the user. Each question will have 3 wrong answers and 1 right answer and the user would then have to select the correct answer. At the end of the quiz, the user will see his/her score!
- Timed Quizzes – Same as the feature above, but with a time limit (that can be choosen by the user). To test their knowledge with a time constraint.
- E-mail results of Quiz – Would be nice to send an e-mail to someone so that they can see how you are doing.
- Fill out some of the specific questions – There are questions on the test that will vary from state to state (i.e. who is your senator, your governor, etc.). So I’d to be able to have these questions to be filled out for the user. This is something I’ve seen in other applications and it would be nice to have in mine as well.
That’s it for this little post. I’ll continue to fix some of the small things that need fixing on the application as it is now. As I get closer and closer to the release date I am getting excited about it as I am curious to see how this application does! Whatever the result, I’ve enjoyed working on this application and the experience I’ve gained has been great and hope to continue to get better at building applications for this great platform!