+ * BlurAlgorithm is automatically picked based on the API version.
+ * It uses RenderEffectBlur on API 31+, and RenderScriptBlur on older versions.
+ * @return {@link ReactBlurView} to setup needed params.
+ */
+ @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)
+ public BlurViewFacade setupWith(@NonNull ViewGroup rootView) {
+ return setupWith(rootView, getBlurAlgorithm());
+ }
+
+ // Setters duplicated to be able to conveniently change these settings outside of setupWith chain
+
+ /**
+ * @see BlurViewFacade#setBlurRadius(float)
+ */
+ public BlurViewFacade setBlurRadius(float radius) {
+ return blurController.setBlurRadius(radius);
+ }
+
+ /**
+ * @see BlurViewFacade#setOverlayColor(int)
+ */
+ public BlurViewFacade setOverlayColor(@ColorInt int overlayColor) {
+ this.overlayColor = overlayColor;
+ return blurController.setOverlayColor(overlayColor);
+ }
+
+ /**
+ * @see BlurViewFacade#setBlurAutoUpdate(boolean)
+ */
+ public BlurViewFacade setBlurAutoUpdate(boolean enabled) {
+ return blurController.setBlurAutoUpdate(enabled);
+ }
+
+ /**
+ * @see BlurViewFacade#setBlurEnabled(boolean)
+ */
+ public BlurViewFacade setBlurEnabled(boolean enabled) {
+ return blurController.setBlurEnabled(enabled);
+ }
+
+ @NonNull
+ @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)
+ private BlurAlgorithm getBlurAlgorithm() {
+ BlurAlgorithm algorithm;
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
+ algorithm = new RenderEffectBlur();
+ } else {
+ algorithm = new RenderScriptBlur(getContext());
+ }
+ return algorithm;
+ }
+}
diff --git a/node_modules/@react-native-community/blur/android/src/oldarch/java/com/reactnativecommunity/blurview/BlurViewManager.java b/node_modules/@react-native-community/blur/android/src/oldarch/java/com/reactnativecommunity/blurview/BlurViewManager.java
deleted file mode 100644
index 1a28209..0000000
--- a/node_modules/@react-native-community/blur/android/src/oldarch/java/com/reactnativecommunity/blurview/BlurViewManager.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.reactnativecommunity.blurview;
-
-import androidx.annotation.NonNull;
-
-import com.facebook.react.bridge.ReactApplicationContext;
-import com.facebook.react.uimanager.ThemedReactContext;
-import com.facebook.react.uimanager.ViewGroupManager;
-import com.facebook.react.uimanager.annotations.ReactProp;
-
-import eightbitlab.com.blurview.BlurView;
-
-class BlurViewManager extends ViewGroupManager