Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frontend/fix: Removed blur-view third party dependency #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,4 @@ dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+"
// From node_modules

implementation 'com.github.Dimezis:BlurView:version-2.0.4'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package com.reactnativecommunity.blurview;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.View;
import android.widget.FrameLayout;

import androidx.annotation.Nullable;

public class BlurView extends FrameLayout {

// TODO : Implement this if needed in android

private Drawable frameClearDrawable;
private float blurRadius = 0f;
private int overlayColor = 0;
private boolean blurAutoUpdate = false;
private boolean blurEnabled = true;

public BlurView(Context context) {
super(context);
}

public BlurView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}

public BlurView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}

// Dummy function for setupWith
public BlurView setupWith(View view) {
// Do setup with the provided view
return this;
}

// Dummy function for setFrameClearDrawable
public BlurView setFrameClearDrawable(Drawable drawable) {
this.frameClearDrawable = drawable;
return this;
}

// Dummy function for setBlurRadius
public BlurView setBlurRadius(float radius) {
this.blurRadius = radius;
return this;
}

// Dummy function for setOverlayColor
public BlurView setOverlayColor(int color) {
this.overlayColor = color;
return this;
}

// Dummy function for setBlurAutoUpdate
public BlurView setBlurAutoUpdate(boolean autoUpdate) {
this.blurAutoUpdate = autoUpdate;
return this;
}

// Dummy function for setBlurEnabled
public BlurView setBlurEnabled(boolean enabled) {
this.blurEnabled = enabled;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import android.view.View;
import com.facebook.react.uimanager.ThemedReactContext;

import eightbitlab.com.blurview.BlurView;

import java.util.Objects;
import javax.annotation.Nonnull;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ public List<Class<? extends JavaScriptModule>> createJSModules() {
public List<ViewManager> createViewManagers(
@Nonnull ReactApplicationContext reactContext
) {
return Collections.<ViewManager>singletonList(new BlurViewManager(reactContext));
return Collections.<ViewManager>singletonList(new com.reactnativecommunity.blurview.BlurViewManager(reactContext));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.facebook.react.uimanager.ViewGroupManager;
import com.facebook.react.uimanager.annotations.ReactProp;

import eightbitlab.com.blurview.BlurView;

class BlurViewManager extends ViewGroupManager<BlurView> {

Expand Down