forked from syncfusion/xamarin-demos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WebViewActivity.cs
37 lines (35 loc) · 1.1 KB
/
WebViewActivity.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#region Copyright Syncfusion Inc. 2001-2016.
// Copyright Syncfusion Inc. 2001-2016. All rights reserved.
// Use of this code is subject to the terms of our license.
// A copy of the current license can be obtained at any time by e-mailing
// [email protected]. Any infringement will be prosecuted under
// applicable laws.
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.Webkit;
namespace SampleBrowser
{
[Activity (Label = "WebView")]
public class WebViewActivity : Activity
{
private WebView m_webView;
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
SetContentView (Resource.Layout.HtmlViewer);
m_webView = FindViewById<WebView> (Resource.Id.webview);
m_webView.Settings.JavaScriptEnabled = true;
string htmlString = Intent.GetStringExtra ("HtmlString");
m_webView.LoadDataWithBaseURL (null, htmlString, "text/html", "utf-8", null);
}
}
}