Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24842] Android: Setting opacity property using the view's object after creation does not work

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2017-06-19T17:28:58.000+0000
Affected Version/sRelease 6.1.0, Release 6.1.1
Fix Version/sRelease 6.1.1
ComponentsAndroid
Labelsregression
ReporterLokesh Choudhary
AssigneeGary Mathews
Created2017-06-16T21:24:42.000+0000
Updated2017-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. The opacity 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 the opacity to 0.5.

Comments

  1. Gary Mathews 2017-06-19

    master: https://github.com/appcelerator/titanium_mobile/pull/9154 6_1_X: https://github.com/appcelerator/titanium_mobile/pull/9155
  2. Samir Mohammed 2017-06-23

    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

JSON Source