Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6659] Android: animation of opacity causes flash of black

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-12-02T23:52:38.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/s2013 Sprint 25, 2013 Sprint 25 API, Release 3.3.0
ComponentsAndroid
Labelsanimation, insight, module_animation, qe-closed-3.3.0, qe-testadded
ReporterTim Poulsen
AssigneeBill Dawson
Created2011-12-14T08:09:39.000+0000
Updated2014-07-28T21:39:35.000+0000

Description

See the attached example from the Advanced training course. Click the red fade/in out box, which animates the opacity from 1 to 0 then back. At the point of opacity=0 the box flashes to black, back to transparent, and then animates back to opacity=1. Might be related to TIMOB-5460? In prior TiMob releases, we got a flash of the splash screen (heavyweight window) which no longer happens. Attached example works fine on iOS.

Attachments

FileDateSize
Lab340.zip2011-12-14T08:09:39.000+00002575543

Comments

  1. Tim Poulsen 2013-07-22

    Still an issue with Ti SDK 3.1.1GA if built to Android 2.x. Doesn't seem to be an issue when built for Android 4.x.
       <Alloy>
       	<Window class="container">
       		<Label id="label" onClick="doClick">Click Me</Label>
       	</Window>
       </Alloy>
       
       ".container": {
       	backgroundColor:"white",
       	layout: 'vertical'
       },
       "Label": {
       	width: 300,
       	height: 100,
       	top: 50,
       	color: "#fff",
       	backgroundColor: 'red',
       	textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER
       }
       
       function doClick(e) {  
           $.label.animate({
           	opacity: 0,
           	duration: 2000,
           	autoreverse: true
           });
       }
       $.index.open();
       
    Tested on Galaxy Nexus running 4.2.2 and Droid (original) running 2.2.3
  2. Bill Dawson 2013-08-26

    On devices running honeycomb or above, this is fixed as part of the TIMOB-11811 effort. Unfortunately, I was still able to reproduce the problem on a Gingerbread device. Looking into it.
  3. Bill Dawson 2013-09-12

    PR: https://github.com/appcelerator/titanium_mobile/pull/4694 Test case is precisely the code from Tim above. Please run it both on Gingerbread and ICS/JB. The animation should occur without a black flash.
  4. Paras Mishra 2014-04-23

    Animation with opacity occurs without any black flash. Verified the fix using: Device : Google Nexus 5, Android Version: 4.4.2 Device: LG-P970, Android version: 4.0.4 Device : Google Nexus 4, Android Version: 4.1.1 Device: Samsung Galaxy Duos, Android version: 2.3.6 SDK: 3.3.0.v20140422163054 CLI version : 3.3.0-dev OS : MAC OSX 10.9.2 Alloy: 1.4.0-dev ACS: 1.0.14 npm:1.3.2 Appcelerator Studio, build: 3.3.0.201404211130 titanium-code-processor: 1.1.1-alpha XCode : 5.1.1

JSON Source