开发者

Website in WebView won't load

开发者 https://www.devze.com 2023-03-13 20:43 出处:网络
My Problem is that the website won\'t load. No Error occures. etleft = (EditText) findViewById(R.id.editTextLeft);

My Problem is that the website won't load. No Error occures.

 etleft = (EditText) findViewById(R.id.editTextLeft);
 wvleft= (WebView) findViewById(R.id.webkitWebViewLeft);
etleft.setOnKeyListener(new OnKeyListener() {

            @Override
            public boolean onKey(View v, int keyCode, KeyEvent event) {

                Log.e("KEYCODE", Integer.toString(keyCode));
                if (keyCode == KeyEvent.KEYCODE_ENTER)
                {
                    Log.e("KEYCODE2", Int开发者_如何学JAVAeger.toString(keyCode));
                    Log.e("URL", etleft.getText().toString());
                    wvleft.loadUrl(etleft.getText().toString());
                }
                return true;
            }
        });

Log:

06-17 11:17:36.349: ERROR/KEYCODE(696): 66
06-17 11:17:36.349: ERROR/KEYCODE2(696): 66
06-17 11:17:36.349: ERROR/URL(696): www.orf.at

Please help!


You should load a URL instead of a hostname. Try http://www.orf.at/ instead of www.orf.at

0

精彩评论

暂无评论...
验证码 换一张
取 消