本文整理汇总了C#中WebView.RequestFocusFromTouch方法的典型用法代码示例。如果您正苦于以下问题:C# WebView.RequestFocusFromTouch方法的具体用法?C# WebView.RequestFocusFromTouch怎么用?C# WebView.RequestFocusFromTouch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebView
的用法示例。
在下文中一共展示了WebView.RequestFocusFromTouch方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: onCreate
/// <summary>
/// Construct the UI and start loading
/// </summary>
public void onCreate()
{
string startUrl = webSettings.GetString ("url");
string title = webSettings.GetString ("title");
mainLayout = new LinearLayout (this.context);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams (ViewGroup.LayoutParams.FillParent, ViewGroup.LayoutParams.FillParent, 0.0F);
mainLayout.LayoutParameters = lp;
((LinearLayout)mainLayout).SetGravity (GravityFlags.CenterVertical);
((LinearLayout)mainLayout).Orientation = Orientation.Vertical;
webView = new WebView (this.context);
WebSettings settings = webView.Settings;
settings.JavaScriptEnabled = true;
settings.BuiltInZoomControls = true;
settings.JavaScriptCanOpenWindowsAutomatically = true;
webView.LayoutParameters = new LinearLayout.LayoutParams (ViewGroup.LayoutParams.FillParent, ViewGroup.LayoutParams.FillParent, 1.0F);
webView.SetWebViewClient (new FHOAuthWebViewClient (this));
webView.RequestFocusFromTouch ();
webView.Visibility = ViewStates.Visible;
LinearLayout barlayout = initHeaderBar (title);
mainLayout.AddView (barlayout);
mainLayout.SetBackgroundColor (Color.Transparent);
mainLayout.SetBackgroundResource (0);
mainLayout.AddView (this.webView);
this.webView.LoadUrl (startUrl);
}