如何在 webview 中使用微调器?

How to use spinner in webview?

这是我的代码, 代码: http://pastebin.com/cHVThsR5

我这里有旋转器,但旋转器一直在旋转。如何让应用程序知道页面加载完成?并最终使微调器不可见?

您需要执行以下操作:

webView.setWebViewClient(new WebViewClient() {
        @Override
        public void onPageFinished(WebView view, String url) {
            super.onPageFinished(view, url);

                pb.setVisibility(View.GONE);

        }
 });

您是否尝试手动使其不可见?

 if (isInternetPresent) {
            ImageView NoInt=(ImageView) findViewById(R.id.NoInternet);
            NoInt.setVisibility(View.GONE);
            ProgressBar pb = this.findViewById(R.id.progressBar); //Get a reference to your ProgressBar


            WebView webView = (WebView) findViewById(R.id.webview);
            WebSettings webSettings = webView.getSettings();
            webSettings.setJavaScriptEnabled(true);
            webView.setWebViewClient(new WebViewClient());
            webView.loadUrl("http://glocalkhabar.com");
            pb.setVisibility(View.GONE); //Make it invisible