Custom android webview renderer - how to?

DepechieDepechie BEInsider, Developer Group Leader ✭✭
edited October 2017 in Xamarin.Forms

So I've been tweaking our custom android webview renderer without much luck.
Instead of posting all code here, I maybe better like to wipe clean and restart. But if I do that, what are other people using to get this working correctly?

First background on how the page is structured, we have a simple contentpage with a grid. Top is a webview loading local html content as string and underneath there is an entry and a button. Pressing the button will add text to the local html and through property binding we update that html to force a new load of the webview.

So what do I need:

  • Extended webview control with field to hold the html string content so that we can use that in the custom renderer to load it
  • We need to be able to update the webview when the html string content changes
  • There has to be a way to do a scroll to bottom once the html content has been loaded
  • Invoke javascript that is injected in the html string content

So far my version still has problems with reloads ( often data is not appearing ) or with the scroll to botton ( often not scrolling because triggered to soon before page has been rendered )


Best Answer


  • DepechieDepechie BEInsider, Developer Group Leader ✭✭

    Hey @RyanDixon thx for the link!
    I'll create a sample app on GitHub and add your code to see how far I can get this working... I'll report back on the effort.

Sign In or Register to comment.