Android : HIde HTML Elements Xamarin Android WebView?

on Sunday, August 10, 2014


I am creating a web wrapper app, and am wanting to only show certain elements in an html page. I have the current code below, and I know I need to use javascript possibly but am not sure where to go to from here.



public class MainActivity : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);

// Set our view from the "main" layout resource
SetContentView (Resource.Layout.Main);

var webView = FindViewById<WebView> (Resource.Id.webView);
webView.Settings.JavaScriptEnabled = true;

// Use subclassed WebViewClient to intercept hybrid native calls
webView.SetWebViewClient (new WebViewClient ());

webView.LoadUrl ("http://bobhoil.com/");

}

public override bool OnCreateOptionsMenu(IMenu menu)
{
base.OnCreateOptionsMenu (menu);
MenuInflater inflater = this.MenuInflater;
inflater.Inflate (Resource.Menu.menu, menu);
return true;
}
}


Thanks


0 comments:

Post a Comment