ActionBar - one click go to url (webView)

SebastianSztyperSebastianSztyper PLMember
edited December 2014 in Xamarin.Android

Here I made the Web View and each button refreshes one page. Unfortunately, this is a problem because you have to button push to TWICE the page is refreshed . How to do it properly to work on first click ?

log:
[SpannableStringBuilder] SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
[SpannableStringBuilder] SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
[WebView] loadUrlImpl: called
[webcore] CORE loadUrl: called
[webkit] Firewall not null
[webkit] euler: isUrlBlocked = false
[WebView] loadUrlImpl: called
[WebCore] uiOverrideUrlLoading: shouldOverrideUrlLoading() returnstrue
[GATE] DEV_ACTION_COMPLETED
[webcore] CORE loadUrl: called
[webkit] Firewall not null
[webkit] euler: isUrlBlocked = false
[GATE] DEV_ACTION_COMPLETED

My app: http://host1gb.net.pl/download.php?file=9a3239af93a9c95ae10bbe8137144678

MainActivity.cs:
LinearLayout linTest = (LinearLayout)ActionBar.CustomView.FindViewById(Resource.Id.linearLayout1);
LinearLayout linTest2 = (LinearLayout)ActionBar.CustomView.FindViewById(Resource.Id.linearLayout2);
LinearLayout linTest3 = (LinearLayout)ActionBar.CustomView.FindViewById(Resource.Id.linearLayout3);
LinearLayout linTest4 = (LinearLayout)ActionBar.CustomView.FindViewById(Resource.Id.linearLayout4);

        linTest.Click += linTest_Click;
        linTest2.Click += linTest2_Click;
        linTest3.Click += linTest3_Click;
        linTest4.Click += linTest4_Click;


    }

    void linTest_Click(object sender, EventArgs e) {    
        //ur code here
        web_view.LoadUrl ("http://www.onet.pl");
    }

    void linTest2_Click(object sender, EventArgs e) {    
        //ur code here
        web_view.LoadUrl ("http://www.wp.pl");
    }

    void linTest3_Click(object sender, EventArgs e) {    
        //ur code here
        web_view.LoadUrl ("http://www.interia.pl");
    }

    void linTest4_Click(object sender, EventArgs e) {    
        //ur code here
        web_view.LoadUrl ("http://www.google.pl");
    }

Posts

  • WilliamJockuschWilliamJockusch ✭✭ USMember ✭✭

    I have a problem which may be similar -- when AdMob is running in my app, I see a lot of the following in the console. The ads work, but it still has to be a sign of some problem. No idea what is wrong.

    [WebView] loadUrlImpl: called
    [webcore]  CORE loadUrl: called
    [webkit] Firewall not null
    [webkit] euler: isUrlBlocked = false
    [WebView] loadUrlImpl: called
    [webcore]  CORE loadUrl: called
    [webkit] Firewall not null
    [webkit] euler: isUrlBlocked = false
    [WebView] loadUrlImpl: called
    [webcore]  CORE loadUrl: called
    
Sign In or Register to comment.