4 using Tizen.NUI.BaseComponents;
5 using Tizen.NUI.Components;
9 namespace Tizen.NUI.Samples
11 using tlog = Tizen.Log;
13 public class WebViewInterceptTest : IExample
15 const string tag = "NUITEST";
18 private WebView webView;
20 public void Activate()
22 win = NUIApplication.GetDefaultWindow();
26 Size = new Size(win.Size.Width, win.Size.Height, 0),
27 BackgroundColor = Color.Green,
28 Layout = new LinearLayout()
30 LinearOrientation = LinearLayout.Orientation.Vertical,
31 Padding = new Extents(3, 3, 3, 3),
36 webView = new WebView();
37 webView.Url = "https://www.google.com/";
38 webView.WidthSpecification = LayoutParamPolicies.MatchParent;
39 webView.HeightSpecification = LayoutParamPolicies.MatchParent;
42 webView.NavigationPolicyDecided += OnCallback;
45 private void OnCallback(object sender, WebViewPolicyDecidedEventArgs e)
47 tlog.Debug(tag, $"callback: navigation policy decided, Url: {e.ResponsePolicyDecisionMaker.Url}");
48 e.ResponsePolicyDecisionMaker.Ignore();
51 public void Deactivate()