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

Android: Implement default values for view properties

    Details

      Description

      In Android, when a property is set to null, we need to define default behavior for each property.

      var label = Ti.UI.createLabel({
        text: 'hi',
        //html: null,
        color: null,
        highlightedColor: null,
        font: null,
        textAlign: null,
        verticalAlign: null,
        ellipzise: null,
        wordWrap: null,
        autoLink: null,
        layout: null,
        size: null,
        left: null,
        top: null,
        center: null,
        right: null,
        bottom: null,
        transform: null,
        backgroundColor: null
      });
      var image = Ti.UI.createImageView({
        width: null,
        height: null,
        images: null, 
        canScale: null,
        image: null,
        defaultImage: null
        
      });
      var win = Ti.UI.createWindow();
      win.add(label);
      win.open();
      

      1.Run code, app shouldn't crash, you should see the text 'hi'

        Attachments

          Activity

            People

            • Assignee:
              hpham Hieu Pham
              Reporter:
              hpham Hieu Pham
              Reviewer:
              Ping Wang
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration