Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11039] Android: Rect not reported correcty when view has borders

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-11-16T09:09:33.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.1.0, 2012 Sprint 23 API, 2012 Sprint 23
ComponentsAndroid
Labelsapi, module_views, qe-3.0.1, qe-testadded, regression
ReporterMartin Guillon
AssigneePing Wang
Created2012-08-24T08:51:38.000+0000
Updated2014-06-19T12:43:11.000+0000

Description

i get that log 08-24 15:41:24.173: I/TiAPI(29514): cropRectView postlayout {"height":300,"y":0,"x":0,"width":200} using that code

var win = Ti.UI.createWindow({
    backgroundColor:'white'
});

var cropRectView = Ti.UI.createView({
    width:200,
    height:300,
    left:100,
    top:60,
    backgroundColor:'#5500ff00',
    borderWidth:2,
    borderColor:'white'
});


cropRectView.addEventListener('postlayout', function(e){
    Ti.API.info('cropRectView postlayout ' + JSON.stringify(cropRectView.rect));
});

win.add(cropRectView);

win.open();
without the borders i get that result 08-24 15:50:08.653: I/TiAPI(29981): cropRectView postlayout {"height":300,"y":60,"x":100,"width":200}

Comments

  1. Betty Tran 2012-09-21

    This is working in 2.1.2GA.
  2. Ping Wang 2012-11-01

    https://github.com/appcelerator/titanium_mobile/pull/3372
  3. Anshu Mittal 2013-01-21

    Tested with: SDK:3.1.0.v20130114171802 Studio:3.0.1.201212181159 Device: LG-p970

JSON Source