English 中文(简体)
不能从网上电文(以下编码)获得任何回报价值
原标题:Can not get any return value from webView.geturl, (code shown below)
public class Browser1Activity extends Activity {

    TextView url;
    WebView ourBrow;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.main);

        ourBrow = (WebView) findViewById(R.id.wvBrowser);
        url = (TextView) findViewById(R.id.tvURL);
        // cancel the web intent that default in android setting
        ourBrow.setWebViewClient(new WebViewClient());

        // webView seeting
        ourBrow.getSettings().setJavaScriptEnabled(true);
        ourBrow.getSettings().setLoadWithOverviewMode(true);
        ourBrow.getSettings().setUseWideViewPort(true);

        try {
            ourBrow.loadUrl("https://www.google.com.au");
        } catch (Exception e) {
            e.printStackTrace();
        }

        url.setText(ourBrow.getUrl());
    }

}

为什么我拿回价表。 <代码>TextView的设定完全是罚款的,WebView也有效,但在我推出该推介器时,斜体显示任何情况。 <代码>ourBrow的设定是否有任何错误?

最佳回答

在你试图将其放在案文上的时候,这在你的法典中不会给你造成任何问题。 您在把这ur子装上网后,必须确定案文。 仅对你的法典进行测试, but子和lick子也一样。

 url.setText(ourBrow.getUrl());

如你在法典中所做的那样,你在案文上 go。

问题回答

为了便于你在网上查阅互联网和装货网页,你必须增加国际互联网对您的汉斯文档案的许可:

<uses-permission android:name="android.permission.INTERNET"/> 




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签