WebViews are only rendered if they are attached (to the Window) and if they are not 'View.GONE'. This means you have to add a WebView to your Activity's hierarchy somehow and either set it to View.INVISIBLE or set its alpha to 0 (make it transparent).
There are 'optimizations' in the WebView implementation that won't render contents until the WebView becomes 'visible'. On Tuesday, September 22, 2015 at 3:44:20 AM UTC-4, Jags wrote: > > thanks, is it the only way ? i can not put it as content, because, there > is already a visible content (another list) i am replacing that content > with webview when required. > > i am surprised why content is not rendered when the webview instance is > not set as a content ! > > On Tuesday, September 22, 2015 at 12:15:33 AM UTC+5:30, TreKing wrote: >> >> >> On Mon, Sep 21, 2015 at 2:07 AM, Jags <[email protected]> wrote: >> >>> i see blank page, the page is not rendered. but when the setcontentview >>> is called before loadurl, (i.e it is visible), the page loads and renders >>> with a white flash. >>> >>> to avoid this white flas, i want to load it while it is not set as >>> layout content. >>> >> >> Leave it as the content but set it to INVISIBLE, then show it once the >> content loads. >> >> >> ------------------------------------------------------------------------------------------------- >> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago >> transit tracking app for Android-powered devices >> > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

