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

Android: Add material "chip" style to Ti.UI.Switch

    Details

      Description

      Summary:
      Google supports a material "Chip" widget which is checkable. Our Ti.UI.Switch view should offer this as a style.
      https://material.io/components/chips

      To-Do:
      Update our style property to support the following Android-only constant.

      • Ti.UI.SWITCH_STYLE_CHIP

      This can be implemented via the Java Chip class.

      Test Code:
      Each switch style can be tested with the attached SwitchStyleTest.js, which will display what's shown below.

      Note:
      The app must use a "Theme.MaterialComponents" based theme or else an exception will occur. So, app's using a custom theme based from "Theme.AppCompat" or similar will crash. This is normal and the exception will state that the theme will need to change.

        Attachments

        1. Switch-Android-Dark.png
          408 kB
          Joshua Quick
        2. Switch-Android-Light.png
          410 kB
          Joshua Quick
        3. SwitchStyleTest.js
          1 kB
          Joshua Quick

          Issue Links

            Activity

              People

              • Assignee:
                jquick Joshua Quick
                Reporter:
                jquick Joshua Quick
                Reviewer:
                Gary Mathews
                Tester:
                Samir Mohammed
              • Watchers:
                3 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