2013-03-01 142 views
10

我正在維基百科上搜索 - 文章搜索試用wikipedia API沙盒和geting網址,例如http://en.wikipedia.org/wiki/Special:ApiSandbox。使用此geting網址解析該網址可以獲取數據顯示在我的網頁視圖中,但該數據不會正確顯示在我的網頁視圖中。Android維基百科文章搜索在我的網絡視圖顯示不當?

我想在我的webview中顯示json數據。所有的webview數據都沒有在我的webview中修復,有時候我的數據顯示不在屏幕上,那時我的webview滾動到水平。

編輯:刪除我的webview中的水平滾動,數據出來的屏幕。

編輯:這是我的屏幕截圖; 我想我喜歡這個

enter image description here

網頁流量數據顯示,但我喜歡這個唯一的數據顯示,因爲我的HTML數據是動態的如何解決這個問題沒有改變HTML數據。

任何人都有任何庫維基百科搜索文章給我一些想法。

enter image description here

ANOTHER QUESTION:如何刪除特定<div><table>Data在我的動態HTML數據,以及如何獲得specific word in webview點擊(如列表視圖點擊)。 給我任何維基百科庫,它對我來說非常有用。

有人可以提供一些提示/建議如何做到這一點。

+0

試試這個解決方案http://stackoverflow.com/questions/14373784/android-how-can-i-load-json-data-to-webview – 2013-03-06 10:24:03

回答

4
WebSettings settings = webview.getSettings(); 
settings.setBuiltInZoomControls(false); 
settings.setUseWideViewPort(true); 
settings.setJavaScriptEnabled(true); 
settings.setSupportMultipleWindows(true); 
settings.setJavaScriptCanOpenWindowsAutomatically(true); 
settings.setLoadsImagesAutomatically(true); 
settings.setLightTouchEnabled(true); 
settings.setDomStorageEnabled(true); 
settings.setLoadWithOverviewMode(true); 

嘗試這些設置與您的webview,我得到我的渲染錯誤與此代碼修復。