2016-07-04 28 views
1

私はwebviewでいくつかのページを開くAndroidアプリを持っています。Android webviewでtwitterページが正しく表示されない

screenshot of the pageが表示されます。私はつぶやきがヘッダーを見ることができるのを見ることができません。

すべてのWebview設定を試しましたが、正しく動作していません。

webview.getSettings().setJavaScriptEnabled(true); 
webview.setWebViewClient(new MyWebViewClient()); 
webview.setWebChromeClient(new MyWebChromeClient); 
webview.getSettings().setDefaultTextEncodingName("utf-8"); 
webview.getSettings().setPluginState(PluginState.ON); 
webview.getSettings().setBuiltInZoomControls(true); 
webview.getSettings().setDisplayZoomControls(false); 
webview.getSettings().setUseWideViewPort(true); 
webview.getSettings().setLoadWithOverviewMode(true); 
webview.getSettings().setDomStorageEnabled(true); 
webview.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY); 
webview.getSettings().setRenderPriority(WebSettings.RenderPriority.HIGH); 
webview.setLayerType(View.LAYER_TYPE_SOFTWARE, null); 

[編集] 私は下のコンソールにエラーを取得しています:あなたは以下のようなlayout_widthとlayout_height属性を設定する必要があります

I/chromium: [INFO:CONSOLE(0)] "Refused to load the image 'https://www.google.com.tr/ads/ga-audiences?v=1&aip=1&t=sr&_r=4&tid=UA-30775-67&cid=1855674525.1467776671&jid=2048800659&_v=j44&z=267031279&ipr=y' because it violates the following Content Security Policy directive: "img-src 'self' 'unsafe-inline' blob: data: https://*.cdn.twitter.com https://ton.twitter.com https://*.twimg.com https://stats.g.doubleclick.net https://www.google.com https://www.google-analytics.com https://www.periscope.tv". 
      ", source: https://mobile.twitter.com/home (0) 
+0

完全なログを投稿します。 –

+1

このリンクをチェック:http://stackoverflow.com/questions/6856814/problems-loading-mobile-twitter-in-webview – prakash

+0

はい。私はすでにプラカスクをチェックしている。しかし、私はログを確認しました。明確な問題はありません。アプリでこの問題をhttps://play.google.com/store/apps/details?id=tr.com.socialmediaアドレスから確認できます。これは2週間前に新しく動作します。しかし、私はそれがWebview 4.4の後に働いていない変更されていない何か。 – mtuygun

答えて

2

android:layout_width="match_parent" 
android:layout_height="match_parent" 
関連する問題