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

Android: Label - A label "Click me" is not centered inside the yellow view

    Details

      Description

      Description:
      A label "Click me" is not centered inside the yellow view.

      This is a regression, does not occur on 2.1.3.

      Steps:
      1. Run the following code:

      // this sets the background color of the master UIView (when there are no windows/tab groups on it)
      Titanium.UI.setBackgroundColor('#000');
       
      var win1 = Titanium.UI.createWindow({  
          title:'Tab 1',
          backgroundColor:'#fff',
          tabBarHidden:true
      }); 
       
      var vwTest = Ti.UI.createView({
          backgroundColor:'yellow',
          height:250,
          width:250
      });
      win1.add(vwTest);
       
      vwTest.addEventListener('click', function(){
          Ti.API.info('You should only see this once per click... but');
          Ti.API.info('Click Event Firing');
      });
               
      var label1 = Titanium.UI.createLabel({
          text:'Click Me',
          color:'#000',
          font:{fontSize:20,fontFamily:'Helvetica Neue'},
          textAlign:'center',
          height:250,
          width:250
      });
       
      vwTest.add(label1);
       
      win1.open();
      

      Expected result:
      The label "click me" should be located in the center of yellow view

      Actual result:
      The label is not centered inside the yellow view

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                billdawson Bill Dawson
                Reporter:
                tsmolich Tamila Smolich
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration