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

Android: Color "brown" is not supported

    Details

      Description

      Problem

      Web color name brown is not supported, despite it being included in the HTML color names standard, and also supposedly-supported by iOS, according to the Webcolor.m code.

      Test case

      Run this code to test each color name in turn, by clicking the window.

      app.js

      // According to the following test case:
      // Android does not currently support: brown. The color yellow is used when a name is not recognised.
      // iOS does not currently support: aqua, fuchsia, lime and maroon.  The color black is used when a name is not recognised.
       
      // stripped for tableview background color still to be tested
       
      var webcolor = [
        'black', 'gray', 'darkgray', 'lightgray', 'white', 'red', 'green', 'blue', 'cyan', 'yellow',
        'magenta', 'orange', 'purple', 'brown', 'transparent',
        'aqua', 'fuchsia', 'lime', 'maroon', 'pink', 'navy', 'silver', 'olive', 'teal'];
       
      var webcolorPointer = 0;
       
      var win = Ti.UI.createWindow({
        backgroundColor: webcolor[webcolorPointer],
        exitOnClose: true,
        fullscreen: false,
        layout: 'vertical',
        title: 'Webcolor Demo'
      });
       
      var label = Ti.UI.createLabel({
        backgroundColor: 'white',
        text: webcolor[webcolorPointer]
      });
      webcolorPointer++;
       
      win.add(label);
       
      // click window to iterate through color array
      win.addEventListener('click', function(e){
        e.source.backgroundColor = webcolor[webcolorPointer];
        label.text = webcolor[webcolorPointer];
        webcolorPointer++;
        if(webcolorPointer === webcolor.length){
          webcolorPointer = 0;
        }
      });
       
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sunila Sunila
                Reporter:
                pdowsett Paul Dowsett
                Reviewer:
                Allen Yeung
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-12999
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration