Pickin' and a Grinnin'

In prior articles, I've spent a fair amount of time creating and managing fishing spots. Now, when I actually catch a fish, I'd like to specify where it was caught. I'd also like to tag the type of fish I caught, and record the date and time. On both the iOS and Android platforms, a 'picker' provides this functionality.

There are actually a number of different types of pickers. Some include:

  • Time and Date Pickers
  • Android's DialogFragment
  • iOS's UIActionSheet
  • Custom Pickers

In this article, I'll explore Time/Date pickers, DialogFragment / UIActionSheet pickers, and custom pickers.

Building on the Prior Article

The prior article titled Take a Picture, it'll Last Longer started the implementation of the catch details view / activity. This article builds upon the prior article, so portions of the code will not be (re)explained. If this causes difficulty, it may be advantageous to first read the prior article.

Background

As a refresher, here's what the various pickers look like when they're fully implemented:

iOS Pickers

The Time / Date of a Catch:


The Location of a Catch:


The Type of Fish Caught:


Android Pickers
Note: Android has separate time and date pickers, so there's an extra screen shot here.

The Date of a Catch:


The Time of a Catch:


The Location of a Catch:


The Type of Fish Caught:


Now that I've illustrated what the pickers will look like, it's time to review the implementation in code.