Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16358] Android: Webview flickers when scrolling for the first time

GitHub Issuen/a
TypeBug
PriorityMedium
StatusResolved
ResolutionHold
Resolution Date2014-05-19T21:25:06.000+0000
Affected Version/sRelease 3.2.0
Fix Version/s2014 Sprint 03, 2014 Sprint 03 API, Release 3.2.3
ComponentsAndroid
Labels3.2.0GA, android, flicker, look1, module_webview, qe-testadded, scroll, triage, webview
ReporterCarlos Luis Seva
AssigneeHieu Pham
Created2014-02-01T17:39:40.000+0000
Updated2017-03-24T18:24:02.000+0000

Description

Webview with transparent or gradient background flickers when scrolling down for the first time in Android with SDK 3.2.0 GA. Once you scroll to the bottom and then scroll up again not produces this behavior. If webview backgroundColor is set with a color as 'white' or '#FFFFFF' works fine. Detected using SDK 3.2.0 GA and 3.2.X versions on Android devices (Samsung Galaxy S III Mini, Samsung Galaxy Tab 3, bq Aquaris 5). With SDK 3.1.3 GA doesn't occur this behavior. Test case:
 
var window = Titanium.UI.createWindow({
	title: 'Test',
	fullscreen: true,
	exitOnClose: true,
	backgroundColor: 'white'
});

var view = Ti.UI.createView();

var webview = Titanium.UI.createWebView({
	backgroundColor: 'transparent',
	url: '/test.html'
});

view.add(webview);
window.add(view);

window.open();

Attachments

FileDateSize
app.js2014-02-01T17:39:40.000+0000310
test.html2014-02-01T17:39:40.000+00008054

Comments

  1. Ritu Agrawal 2014-02-03

    Moving this ticket to engineering as I can reproduce this issue on Galaxy Nexus device with 3.2.0 release. Note that this is a regression as there is no flickering when I recompile application with 3.1.3 release.
  2. Carlos Luis Seva 2014-02-03

    Video that shows this issue on Samsung Galaxy Tab 3: http://www.youtube.com/watch?v=Nv0zkh4ZKUY
  3. Hieu Pham 2014-02-04

    I can reproduce this on 4.x device on both 3.2.0.GA and 3.1.3.GA. This is not a regression. I will submit a PR to fix this shortly.
  4. Hieu Pham 2014-02-04

    master PR: https://github.com/appcelerator/titanium_mobile/pull/5320
  5. Carlos Luis Seva 2014-02-08

    Tested using 3.3.0.20140207153316 and now works properly. Thanks everyone!
  6. Fokke Zandbergen 2014-02-14

    While you're at it, could you also solve this related issue? http://premius.net/blog/andoid/118-android-webview-transparent-background-for-android-2-3-and-4-x.html It's a hack, but indeed on the following device it needs the background and acceleration to be re-set after load:
       HTC Desire S
         ID                          = SH1B9TJ05256
         State                       = device
         SDK Version                 = 2.3.5 (android-10)
         ABIs                        = armeabi-v7a, armeabi
       
  7. Fokke Zandbergen 2014-02-14

    Workaround for the original issue by the way:
       backgroundColor: '#01FFFFFF'
       
  8. Paras Mishra 2014-03-25

    Verified the fix, hence closing the issue. Environment used: Device : Google Nexus 5, Android Version: 4.4.2 SDK: 3.2.3.v20140324164913 CLI version : 3.2.1 OS : MAC OSX 10.9.2 Alloy: 1.3.1 ACS: 1.0.14 npm:1.3.2 Appcelerator Studio, build: 3.2.3.201403190645 titanium-code-processor: 1.1.0 XCode : 5.1
  9. Hieu Pham 2014-04-11

  10. Fokke Zandbergen 2014-04-14

    [~pmishra], could you please reopen the ticket since we need a new fix now the original one has been reverted?
  11. Hieu Pham 2014-04-16

    There are multiple workarounds for this issue. We are not planning to fix this since the fix has side effects.
  12. Carlos Luis Seva 2014-05-19

    Please, try to solve this issue. It's very important for my app. Users have been complaining for this reason. Thanks
  13. Ingo Muschenetz 2014-05-19

    Resolving as "hold" for now.

JSON Source