Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Discus Flickers in ScrollView ('d) WebView

hexagodhexagod Member ✭✭✭

Discus is flickering in WebView. I'm using the ScrollView because it maintains the page banner but hides when user scrolls down. However, using the ScrollView to display the WebView also causes a flicker. Does anyone have any ideas on how to fix this?

inside Activity

    protected override void OnCreate(Bundle savedInstanceState)
    {
        base.OnCreate(savedInstanceState);

        SetContentView(Resource.Layout.whatsOn);

        WebView whatsOnWebView = FindViewById<WebView>(Resource.Id.webViewWhatsOn);
        whatsOnWebView.SetBackgroundColor(Android.Graphics.Color.Green);
        whatsOnWebView.SetWebViewClient(new MyWebViewClient(this));

        whatsOnWebView.LoadUrl("https://bitchute.com/");
        whatsOnWebView.Settings.JavaScriptEnabled = true;
        whatsOnWebView.Settings.BuiltInZoomControls = true;
        whatsOnWebView.Settings.SetSupportZoom(true);
        whatsOnWebView.ScrollbarFadingEnabled = false;

    }

inside whatsOn.axml

<?xml version="1.0" encoding="utf-8"?>











<android.webkit.WebView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/webViewWhatsOn" />

full project

github.com/hexag0d/bitchute_mobile_android_a2

Best Answers

  • hexagodhexagod Member ✭✭✭
    Accepted Answer

    @Alexander.6272 said:
    @hexagod Do you have any news about this? I have the same issue on XF 3.6.0.220655. Thks!

    It went away when I got rid of the scrollview. I'm now using a viewpager setup and javascript commands against webview instead of using a WebView inside of a ScrollView. I think this glitch happens when you have WebView inside a ScrollView

  • hexagodhexagod Member ✭✭✭
    Accepted Answer

    Here's my current app if you wanna see a WebView implementation that doesn't have tha discus flickering issue

    https://github.com/hexag0d/BitChute_Mobile_Android_BottomNav

Answers

  • jezhjezh Member, Xamarin Team Xamurai

    I have tested your code on my device, but I am still not understand the flicker you said. Could you please post more details?

  • Alexander.6272Alexander.6272 USMember

    @hexagod Do you have any news about this? I have the same issue on XF 3.6.0.220655. Thks!

  • hexagodhexagod Member ✭✭✭
    Accepted Answer

    @Alexander.6272 said:
    @hexagod Do you have any news about this? I have the same issue on XF 3.6.0.220655. Thks!

    It went away when I got rid of the scrollview. I'm now using a viewpager setup and javascript commands against webview instead of using a WebView inside of a ScrollView. I think this glitch happens when you have WebView inside a ScrollView

  • hexagodhexagod Member ✭✭✭
    Accepted Answer

    Here's my current app if you wanna see a WebView implementation that doesn't have tha discus flickering issue

    https://github.com/hexag0d/BitChute_Mobile_Android_BottomNav

Sign In or Register to comment.