gpt4 book ai didi

xamarin - Webview 无法滚动

转载 作者:行者123 更新时间:2023-12-03 21:29:31 25 4
gpt4 key购买 nike

我有这个 Xamarin Forms 页面:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/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>

当我打开我的应用程序时,在谷歌提示中输入任何内容,我无法在结果页面上滚动。如何启用此功能?

当我在谷歌搜索“xamarin webview 启用滚动”时,我只找到有关禁用它的信息......

最佳答案

创建您自己的渲染器并按如下方式覆盖此方法:

public override bool DispatchTouchEvent(MotionEvent e)
{
Parent.RequestDisallowInterceptTouchEvent(true);
return base.DispatchTouchEvent(e);
}

Please find details in this link

关于xamarin - Webview 无法滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40204199/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com