Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

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

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-12-21T05:15:51.000+0000
Affected Version/sRelease 3.0.0, 2012 Sprint 21 Core
Fix Version/sRelease 3.0.0, Release 3.1.0, 2012 Sprint 21 Core, 2012 Sprint 21
ComponentsAndroid
Labelscore, module_label, qe-and100112, qe-testadded, regression
ReporterTamila Smolich
AssigneeBill Dawson
Created2012-10-08T23:31:38.000+0000
Updated2012-12-21T05:15:51.000+0000

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

FileDateSize
2.1.3.png2012-10-08T23:31:38.000+000019002
3.0.0.png2012-10-08T23:31:38.000+000018989

Comments

  1. Bill Dawson 2012-10-11

    Master PR: https://github.com/appcelerator/titanium_mobile/pull/3179 3_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/3180
  2. Tamila Smolich 2012-10-17

    Closing as fixed. Verified and tested on: Titanium Studio, build: 3.0.0.201210151149 Titanium SDK, builds: 3.0.0.v20121017100120; 3.1.0.v20121017102121 Device: Nexus 7 (4.1.1)

JSON Source