Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-4564

Ability to assign class to a view element

    Details

    • Type: Improvement
    • Status: Resolved
    • Resolution: Invalid
    • Affects Version/s: None
    • Component/s: Alloy, Titanium SDK & CLI
    • Labels:
      None

      Description

      Currently, it is only possible to assign styling parameters to view elements, like width, height etc. However, it would be a lot easier if it was possible to assign CLASS parameter, which would reduce the amount of code in controllers.

      Instead of
      var label1 = Ti.UI.createLabel({
      color: '#900',
      font:

      { fontSize:48 }

      ,
      shadowColor: '#aaa',
      shadowOffset:

      {x:5, y:5}

      ,
      shadowRadius: 3,
      text: 'A simple label',
      textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,
      top: 30,
      width: Ti.UI.SIZE, height: Ti.UI.SIZE
      });

      would be a lot easier to have the below:
      var label1 = Ti.UI.createLabel(

      { class: 'myLabelClass' }

      );

        Attachments

          Activity

            People

            • Assignee:
              shossain Shak Hossain
              Reporter:
              isener ILAY SENER
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code