[TIMOB-2663] Android: Opacity problem
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2014-02-21T15:15:42.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | n/a |
Components | Android |
Labels | core |
Reporter | daniyal |
Assignee | Sunila |
Created | 2011-04-15T03:26:21.000+0000 |
Updated | 2017-03-27T20:12:51.000+0000 |
Description
Problem#1:
When initializing an object (such as a view) and setting its' opacity to 0 initially (e.g. opacity: 0), then changing it using obj.animate(opacity: 0.6, duration: 1) yields no result. For example:
var viewObj = Ti.UI.createView({
// other properties
opacity: 0
});
// inside some handler; onClick if we try changing opacity
viewObj.animate({
opacity: 0.6,
duration: 1
});
// yeilds no result
Problem#2:
Changing the opacity with direct assignment or using the "setOpacity" method doesn't update the object with the new opacity, but outputting it on to the console shows the opacity property has been changed however.
For more information kindly refer to this thread; http://developer.appcelerator.com/question/92891/android-setopacity-problem"> http://developer.appcelerator.com/question/92891/android-setopacity...
I forgot to mentioned; I'm using Titanium SDK 1.5.0 and Android SDK 2.2
Assigning to Don for triage.
Any updates on this issue? Still reproducible.
Hi, plz fix this. On android, you cannot change the opacity of a view neither with changing the property directly or with using setOpacity(newOpacity) method. Thank you in advance. regards,
I was able to reproduce this with: TiStudio 1.0.9 GA SDK 1.8.2 GA on Mac OS 10.7
Tested on a Samsung Galaxy S2 using TiSDK 2.2.0v20120821095711, issue #2 still valid, issue #1 seems to be fixed.
I cannot reproduce the problem, both the setter and the property works. Here is the sample I tried var win = Ti.UI.createWindow({backgroundColor: 'white'}); var view = Ti.UI.createView({ width: 100, height: 100, backgroundColor: 'red', opacity: 0 }); win.addEventListener('click', function(e) { view.animate({ opacity: 0.3, duration: 1 }); }); view.addEventListener('click', function(e) { view.opacity=1; e.cancelBubble=true; }); win.add(view); win.open();
Closing ticket as I am unable to reproduce this issue with the following environment; Pixel (7.1) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80