[TIMOB-24842] Android: Setting opacity property using the view's object after creation does not work
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2017-06-19T17:28:58.000+0000 |
| Affected Version/s | Release 6.1.0, Release 6.1.1 |
| Fix Version/s | Release 6.1.1 |
| Components | Android |
| Labels | regression |
| Reporter | Lokesh Choudhary |
| Assignee | Gary Mathews |
| Created | 2017-06-16T21:24:42.000+0000 |
| Updated | 2017-06-23T20:24:36.000+0000 |
Description
*This is a regression. Works fine with SDK 6.0.4.GA. Does not work from 6.1.0.GA onwards.*
Steps to reproduce:
1. Use the code below in your app.js.
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var parent = Ti.UI.createView({
backgroundColor: "blue",
width: 200, height: 200,
// borderWidth: 5,
// borderRadius: 10,
// borderColor: 'green',
// opacity: 0.5
});
win.add(parent);
parent.addEventListener('click', function(e) {
parent.opacity = 0.5;
});
win.open();
2. Run on android device/emulator.
3. Tap on the blue view.
Actual results:
1. Theopacity of the view does not change.
2. I see that if the borderRadius, borderWith or the borderColor property is set during creation then it works fine.
Expected results:
1. Clicking on the blue view should change theopacity to 0.5.
master: https://github.com/appcelerator/titanium_mobile/pull/9154 6_1_X: https://github.com/appcelerator/titanium_mobile/pull/9155
Verified fix in SDK Version: 6.1.1.v20170622183547 and SDK Version: 6.2.0.v20170622105148. Test and other information can be found at: master: https://github.com/appcelerator/titanium_mobile/pull/9154 6_1_X: https://github.com/appcelerator/titanium_mobile/pull/9155