本文介绍了Webview 无法滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
限时送ChatGPT账号..我有这个 Xamarin 表单页面:
I've got this Xamarin Forms page:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin/schemas/2014/forms"
xmlns:x="http://schemas.microsoft/winfx/2009/xaml"
xmlns:local="clr-namespace:TestApp1"
x:Class="TestApp1.MainPage">
<ContentPage.Content>
<StackLayout Orientation="Vertical">
<WebView Source="http://www.google.de" HeightRequest="3000" WidthRequest="100"/>
</StackLayout>
</ContentPage.Content>
</ContentPage>
当我打开我的应用程序时,在谷歌提示中输入任何内容,我无法在结果页面上滚动.如何启用此功能?
When I open my app, enter anything in the google prompt, I can't scroll on the results page. How do I enable this?
当我在谷歌搜索xamarin webview 启用滚动"时,我只找到有关禁用它的信息...
When I google for "xamarin webview enable scrolling" I only find information about disabling it...
推荐答案
创建自己的渲染器并按如下方式覆盖此方法:
Create your own renderer and override this method as follows:
public override bool DispatchTouchEvent(MotionEvent e)
{
Parent.RequestDisallowInterceptTouchEvent(true);
return base.DispatchTouchEvent(e);
}
请在此链接中找到详细信息
这篇关于Webview 无法滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论