[TIMOB-11039] Android: Rect not reported correcty when view has borders
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-11-16T09:09:33.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 3.1.0, 2012 Sprint 23 API, 2012 Sprint 23 |
Components | Android |
Labels | api, module_views, qe-3.0.1, qe-testadded, regression |
Reporter | Martin Guillon |
Assignee | Ping Wang |
Created | 2012-08-24T08:51:38.000+0000 |
Updated | 2014-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}
This is working in 2.1.2GA.
https://github.com/appcelerator/titanium_mobile/pull/3372
Tested with: SDK:3.1.0.v20130114171802 Studio:3.0.1.201212181159 Device: LG-p970