Surface::setbuffersDimensions Log being spammed

前端 未结 3 535
轮回少年
轮回少年 2021-01-17 09:09

I have built an Android app that is working fine and as expected with a tablet: Acer. 7-inch API 21.

I recently got a new tablet: Acer. 10-inch API 22.

Now

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-17 09:47

    If anyone else finds this issue, make sure that you don't have something like a ProgressBar or so that you're not stopping from rendering after the WebView has finished loading. In Xamarin.Android, I had to override OnPageFinished, from the WebViewClient, and set progressBar.Visibility = ViewStates.Gone;. There's also a link in there to a GitHub repo (not mine) that has some other WebViewClient override implementations:

            public class MyWebViewClient : WebViewClient
        {
            public override bool ShouldOverrideUrlLoading(WebView view, string url)
            {
                view.LoadUrl(url);
                return false;
            }
    
            //More overrides: https://github.com/xamarin/monodroid-samples/blob/master/MonoIO/UI/MapFragment.cs
            public override void OnPageFinished(WebView view, string url)
            {
                base.OnPageFinished(view, url);
                progressBar.Visibility = ViewStates.Gone;
                view.Visibility = ViewStates.Visible;
            }
    
        }
    

提交回复
热议问题