2013-08-11 4 views
0

내 앱에서 웹보기 (일부 RSS 뉴스 제공)는 스크롤 할 때 깜박이거나 때때로 기사를 읽는 경우에 사용됩니다. 어떻게 해결할 수 있습니까?Android webView 깜박임

문제는 내 4.1.1 장치와 에뮬레이터에서 동일합니다. 이 내 웹보기입니다 :

final WebView desc = (WebView) view.findViewById(R.id.desc); 

     desc.setWebViewClient(new WebViewClient() { 

      @Override 
      public void onPageFinished(WebView view, String url) { 
       // super.onPageFinished(view, url); 
       desc.loadUrl("javascript:(function() { " 
         + "document.getElementsByTagName('img')[0].style.display = 'none'; " 
         + "})()"); 
      } 
     }); 



     // Set webview properties 
     WebSettings ws = desc.getSettings(); 

     ws.setSupportZoom(true); 
     // ws.setDisplayZoomControls(true); 
     ws.setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN); 
     ws.setLightTouchEnabled(false); 
     ws.setPluginState(PluginState.ON); 
     ws.setJavaScriptEnabled(true); 
     ws.setUserAgentString("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.36 (KHTML, like Gecko) Chrome/13.0.766.0 Safari/534.36"); 

     // ws.setLoadsImagesAutomatically(false); 
     // desc.requestFocus(View.FOCUS_DOWN); 

     desc.loadDataWithBaseURL("", DESC, 
       "text/html", "UTF-8", null); 

답변

2

풋 안드로이드 : 그 활동 hardwareAccelerated = "false"를. 나는 그것을 할 수있다 희망

감사합니다, Chaitanya.K을하는 데 도움이

+0

작동하지 않습니다. – Erum

0

당신은 안드로이드 설정 때, 당신은 그 activity.otherwise 애니메이션에서 애니메이션을 사용하지 않는 것이 좋습니다 거라고 활동 hardwareAccelerated = "거짓" 너무 나빠질거야. webview.setLayerType (View.LAYER_TYPE_SOFTWARE, null)을 설정할 수 있습니다. 도 닫습니다. 하드웨어 가속 됨