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

[android] label with height = T.UI.SIZE and no text not sizing correctly in layout

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Not Our Bug
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Android
    • Labels:
    • Environment:

      titanium 2.1.3.GA to 3.1.0 master
      android 4.0.3
      device / simulator

      Description

      look at the test case, the second containing blue view should have an height of 0. Instead it has the height of the label as if it had text.
      Replace the second label with a view and see how it should work

      var win = Titanium.UI.createWindow();
      win.backgroundColor = '#ccc';
       
      var container = Ti.UI.createView({
          	height:70,
          	top:0,
          	layout:'vertical',
          	backgroundColor:'red'
         	})
      var view = Ti.UI.createView({
      	height:Ti.UI.SIZE,
          backgroundColor:'blue'
         	})
      container.add(view);
       
      var view2 = Ti.UI.createLabel({
      	height:Ti.UI.SIZE,
      	backgroundColor:'green',
      	text:'TEST'
      })
      view.add(view2);
      win.add(container);
       
      container = Ti.UI.createView({
          	height:70,
          	top:100,
          	layout:'vertical',
          	backgroundColor:'red'
         	})
      view = Ti.UI.createView({
      	height:Ti.UI.SIZE,
          	backgroundColor:'blue'
         	})
      container.add(view);
       
      view2 = Ti.UI.createLabel({ //create a view instead here and it works
      	height:Ti.UI.SIZE,
      	backgroundColor:'green'
      })
      view.add(view2);
       
       
      win.add(container);
      win.open();
      

        Attachments

          Activity

            People

            • Assignee:
              ingo Ingo Muschenetz
              Reporter:
              farfromrefuge Martin Guillon (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration