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

Android: Parity for ListView's "selectionStyle" and "[de]selectItem" methods

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 10.1.0
    • Component/s: Android, iOS
    • Labels:

      Description

      This is a conditional code scenario that we have since day one: Designing a non-clickable cell on iOS and Android, ending up doing the following:

      {
          properties: {
              selectionStyle: OS_ANDROID ? undefined : Ti.UI.iOS.ListViewCellSelectionStyle.NONE
          }
      }
      

      What this ticket aims for is to move Ti.UI.iOS.ListViewCellSelectionStyle.NONE to Ti.UI.ListViewCellSelectionStyle.NONE, add Android parity and also deprecate the existing iOS constants Ti.UI.iOS.ListViewCellSelectionStyle.BLUE and Ti.UI.iOS.ListViewCellSelectionStyle.GRAY in favor of Ti.UI.ListViewCellSelectionStyle.DEFAULT (which is selectable in reflects the current behavior of iOS and Android).

      Finally (and less critical), Android should support the selectItem(...) and deselectItem(...) properties which is used to manually set a selection (using selectItem)) or clear a selection after tapping a selectable cell (using deselectItem).

      For us this would fix 39+ conditional statements immediately.

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              hknoechel Hans Knöchel
              Reviewer:
              Joshua Quick
            • Watchers:
              4 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