Procházet zdrojové kódy

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

Avery Choke Kar Sing před 5 roky
rodič
revize
c8977ec7ce

+ 2
- 0
android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java Zobrazit soubor

@@ -290,6 +290,8 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
290 290
   public void setHardwareAccelerationDisabled(WebView view, boolean disabled) {
291 291
     if (disabled) {
292 292
       view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
293
+    } else {
294
+      view.setLayerType(View.LAYER_TYPE_NONE, null);
293 295
     }
294 296
   }
295 297