Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-28426

Android: Add "datePickerStyle" support to Ti.UI.Picker

    Details

    • Story Points:
      7

      Description

      Summary:
      The Ti.UI.Picker view's datePickerStyle is currently iOS only. We should add support on Android. In particular, we should add the "compact" style which shows the picker as a read-only text field, and when tapped on, show a date/time selection dialog which matches Google's design guidelines.

      The "datePickerStyle" property needs to be supported by the following types on Android:

      Style Constants:
      Copy the following constants from Ti.UI.iOS to Ti.UI. Using the old constants should cause a deprecation warning on iOS.

      Note:
      If the Android only boolean properties useSpinner or nativeSpinner are defined, then they must take priority over the datePickerStyle property to maintain backward compatibility. When these boolean properties are set true, then they must do the equivalent of DATE_PICKER_STYLE_WHEELS.

      Compact/Automatic Date Style:
      Android should show a read-only text field with a drop-down arrow. When tapped on, a selection dialog should appear.

      The iOS equivalent is this...

      Compact/Automatic Time Style:
      On Android it will appear as follows...

      The iOS equivalent is this...

      Inline Date Style:
      The picker appears as a calendar view.

      Inline Time Style:
      The picker appears as a clock view on Android and a field with spinners on iOS.

      Wheels Date Style:
      Spinner picker wheels appear for selecting month, day, and year.

      Wheels Time Style:
      Spinner picker wheels appear for selecting hours, minutes, and AM/PM.

        Attachments

        1. TimePickerStyleTest.js
          1 kB
        2. PickerTime-Wheels-iOS.png
          PickerTime-Wheels-iOS.png
          794 kB
        3. PickerTime-Wheels-Android.png
          PickerTime-Wheels-Android.png
          409 kB
        4. PickerTime-Inline-iOS.png
          PickerTime-Inline-iOS.png
          778 kB
        5. PickerTime-Inline-Android.png
          PickerTime-Inline-Android.png
          437 kB
        6. PickerTime-Compact-iOS.png
          PickerTime-Compact-iOS.png
          773 kB
        7. PickerTime-CompactDialog-iOS.png
          PickerTime-CompactDialog-iOS.png
          891 kB
        8. PickerTime-CompactDialog-Android.png
          PickerTime-CompactDialog-Android.png
          458 kB
        9. PickerTime-Compact-Android.png
          PickerTime-Compact-Android.png
          405 kB
        10. PickerDate-Wheels-iOS.png
          PickerDate-Wheels-iOS.png
          820 kB
        11. PickerDate-Wheels-Android.png
          PickerDate-Wheels-Android.png
          414 kB
        12. PickerDate-Inline-iOS.png
          PickerDate-Inline-iOS.png
          830 kB
        13. PickerDate-Inline-Android.png
          PickerDate-Inline-Android.png
          439 kB
        14. PickerDate-Compact-iOS.png
          PickerDate-Compact-iOS.png
          775 kB
        15. PickerDate-CompactDialog-iOS.png
          PickerDate-CompactDialog-iOS.png
          962 kB
        16. PickerDate-CompactDialog-Android.png
          PickerDate-CompactDialog-Android.png
          457 kB
        17. PickerDate-Compact-Android.png
          PickerDate-Compact-Android.png
          406 kB
        18. DatePickerStyleTest.js
          1 kB

          Issue Links

            Activity

              People

              • Assignee:
                jquick Joshua Quick
                Reporter:
                jquick Joshua Quick
                Reviewer:
                Gary Mathews
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration