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

Cannot style links in Attributed Strings

    Details

    • Story Points:
      5
    • Sprint:
      2016 Sprint 4 SDK

      Description

      The following test case shows you cannot override the color and underlining of links in Attributed Strings. It doesn't matter if you add the link before or after styling the same (or part of) the text you make a link.

      I'd like to change the color and remove the underline.

      Test Case

      var win = Titanium.UI.createWindow({
        backgroundColor: '#ddd',
      });
       
      win.add(Ti.UI.createLabel({
        top: 100,
        attributedString: Ti.UI.iOS.createAttributedString({
          text: 'Appcelerator always blue and underlined',
          attributes: [
          {
            type: Ti.UI.iOS.ATTRIBUTE_LINK,
            value: 'http://www.appcelerator.com',
            range: [0, 12]
          }, 
          {
            type: Ti.UI.iOS.ATTRIBUTE_FOREGROUND_COLOR,
            value: 'red',
            range: [0, 12]
          },
          {
            type: Ti.UI.iOS.ATTRIBUTE_UNDERLINES_STYLE,
            value: Ti.UI.iOS.ATTRIBUTE_UNDERLINE_STYLE_NONE,
            range: [0, 12]
          }]
        })
      }));
       
      win.open();
      

        Attachments

          Activity

            People

            • Assignee:
              apetkov Angel Petkov
              Reporter:
              fokkezb Fokke Zandbergen
              Reviewer:
              Pedro Enrique (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code