2017-08-08 63 views
0

在我的手機上Yandex或鉻瀏覽器顯示此頁面的全部內容 https://www.sbm.org.tr/tr/OnlineIslemler/Sayfalar/TrafikPoliceSorgula.aspx 但我的webview不顯示完整內容。Android的webview不顯示全部內容(Bootstrap和jQuery)

這裏是我的代碼

public class MainActivity extends AppCompatActivity { 
    @Override 
    protected void onCreate(Bundle savedInstanceState) { 
     super.onCreate(savedInstanceState); 
     setContentView(R.layout.activity_main); 
     WebView mWebView = (WebView) findViewById(R.id.webview); 

     mWebView = (WebView) findViewById(R.id.webview); 

     mWebView.getSettings().setJavaScriptEnabled(true); 
     mWebView.getSettings().setDomStorageEnabled(true); 

     mWebView.setWebChromeClient(new WebChromeClient()); 
     mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); 
     mWebView.getSettings().setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NORMAL); 


     mWebView.loadUrl("https://www.sbm.org.tr/tr/OnlineIslemler/Sayfalar/TrafikPoliceSorgula.aspx"); 

     /* final ProgressDialog progress = ProgressDialog.show(this, "Sayfa", "Yükleniyor....", true); 
     progress.show(); 
     mWebView.setWebViewClient(new WebViewClient() { 

      @Override 
      public void onPageFinished(WebView view, String url) { 
       super.onPageFinished(view, url); 
       Toast.makeText(getApplicationContext(), "Sayfa yüklendi", Toast.LENGTH_SHORT).show(); 
       progress.dismiss(); 
      } ` 

      public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { 
       Toast.makeText(getApplicationContext(), "Bir hata oluştu", Toast.LENGTH_SHORT).show(); 
       progress.dismiss(); 
      } 
     }); 


*/ 
    } 
} 

回答

0

網頁視圖具有全景模式。詳情請見setLoadWithOverviewMode

settings.setUseWideViewPort(true); 
settings.setLoadWithOverviewMode(true);