Browse Source

fix(android): unable to re-enable hardware acceleration after disabled it (#553)

Avery Choke Kar Sing 5 years ago
parent
commit
c8977ec7ce

+ 2
- 0
android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java View File

290
   public void setHardwareAccelerationDisabled(WebView view, boolean disabled) {
290
   public void setHardwareAccelerationDisabled(WebView view, boolean disabled) {
291
     if (disabled) {
291
     if (disabled) {
292
       view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
292
       view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
293
+    } else {
294
+      view.setLayerType(View.LAYER_TYPE_NONE, null);
293
     }
295
     }
294
   }
296
   }
295
 
297