Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26650] Android: Using toImage on views with border properties not added to UI results in empty blob

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2019-01-22T12:43:46.000+0000
Affected Version/sRelease 7.4.0, Release 7.5.0
Fix Version/sRelease 8.1.0
ComponentsAndroid
Labelsn/a
ReporterRene Pot
AssigneeYordan Banev
Created2018-12-13T15:44:44.000+0000
Updated2019-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().

Comments

  1. Yordan Banev 2018-12-14

    PR: https://github.com/appcelerator/titanium_mobile/pull/10540
  2. Samir Mohammed 2019-01-29

    *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

JSON Source