diff options
author | mindyp <mindyp@google.com> | 2012-09-09 11:17:00 -0700 |
---|---|---|
committer | mindyp <mindyp@google.com> | 2012-09-09 16:11:57 -0700 |
commit | 3bcf180f8104bc27319086a9a6ece5a3c2917c37 (patch) | |
tree | 5863eff8223e0eae68e93860dba8729595ddd978 /assets | |
parent | 44c1571a6a81eda7dd508f74b64adae1e124101b (diff) | |
download | android_packages_apps_UnifiedEmail-3bcf180f8104bc27319086a9a6ece5a3c2917c37.tar.gz android_packages_apps_UnifiedEmail-3bcf180f8104bc27319086a9a6ece5a3c2917c37.tar.bz2 android_packages_apps_UnifiedEmail-3bcf180f8104bc27319086a9a6ece5a3c2917c37.zip |
Add loading animations to conversation view
fixes b/6272925 jank - conversation loading isn't animated
fixes b/7131797 Blank scren shown for live conversation, when in airplane mode
Note: need to do a next cl that puts off showing the spinner
until at least XXX ms have passed
Also, we cant use the software layer for rendering like we did
in gmail1
it looks like there is a skia crash that triggers when we try
to use software / switch to hardware rendering for the browser
need to investigate that more
Change-Id: I96a30b700c3e88d52e603fe2f11b44d113e013d2
Diffstat (limited to 'assets')
-rw-r--r-- | assets/script.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/assets/script.js b/assets/script.js index 45b72a02b..a84275bf2 100644 --- a/assets/script.js +++ b/assets/script.js @@ -222,8 +222,26 @@ function replaceSuperCollapsedBlock(startIndex) { parent.removeChild(block); measurePositions(); } + +function onContentReady(event) { + window.mail.onContentReady(); +} + // END Java->JavaScript handlers +window.onload = function() { + // PAGE READINESS SIGNAL FOR JELLYBEAN AND NEWER + // Notify the app on 'webkitAnimationStart' of a simple dummy element with a simple no-op + // animation that immediately runs on page load. The app uses this as a signal that the + // content is loaded and ready to draw, since WebView delays firing this event until the + // layers are composited and everything is ready to draw. + // + // This code is conditionally enabled on JB+ by setting the 'initial-load' CSS class on this + // dummy element. + document.getElementById("initial-load-signal") + .addEventListener("webkitAnimationStart", onContentReady, false); +}; + collapseQuotedText(); hideUnsafeImages(); normalizeMessageWidths(); |