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
精彩评论