[TIMOB-26650] Android: Using toImage on views with border properties not added to UI results in empty blob
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-01-22T12:43:46.000+0000 |
Affected Version/s | Release 7.4.0, Release 7.5.0 |
Fix Version/s | Release 8.1.0 |
Components | Android |
Labels | n/a |
Reporter | Rene Pot |
Assignee | Yordan Banev |
Created | 2018-12-13T15:44:44.000+0000 |
Updated | 2019-01-29T12:28:44.000+0000 |
Description
Example code:
var image = Ti.UI.createView({
width: 300,
height: 300,
backgroundColor: "#fff",
borderRadius: 5
});
//$.index.add(image);
setTimeout(function(){
var newImage = Ti.UI.createImageView({
image: image.toImage(),
bottom: 1
});
$.index.add(newImage);
}, 1000);
This won't display anything, though an imageview is added after a second, it is just empty. However, when uncommenting the line to add the first image to the index controller, it does work.
Also, when removing any border properties, it will work as well. This includes borderRadius
, borderColor
or borderWidth
.
*Expected result*:
All border properties should just work and be displayed in the blob resulting from toImage()
.
PR: https://github.com/appcelerator/titanium_mobile/pull/10540
*Closing ticket*, fix verified in SDK version
8.1.0.v20190128173213
Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/10540