Skip to content

Commit

Permalink
Issue mozilla-mobile#1063: InfoFragment: Hide WebView until page is l…
Browse files Browse the repository at this point in the history
…oaded.
  • Loading branch information
pocmo committed Sep 10, 2018
1 parent d27d5d4 commit a894513
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/src/main/java/org/mozilla/focus/browser/InfoFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ class InfoFragment : EngineViewLifecycleFragment(), Session.Observer {
// (e.g. wrong tracker count). However disabling tracking protection here shouldn't have any negative effects.
engineSession.disableTrackingProtection()

// To avoid a visual glitch hide the WebView until the page is loaded.
webView!!.asView().visibility = View.GONE

webView!!.render(engineSession)
}

Expand All @@ -58,6 +61,7 @@ class InfoFragment : EngineViewLifecycleFragment(), Session.Observer {
progressView?.announceForAccessibility(getString(R.string.accessibility_announcement_loading))
} else {
progressView?.announceForAccessibility(getString(R.string.accessibility_announcement_loading_finished))
webView?.asView().visibility = View.VISIBLE
}

progressView?.visibility = if (loading) {
Expand Down

0 comments on commit a894513

Please sign in to comment.