public class PickerUIBlurHelper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
PickerUIBlurHelper.BlurFinishedListener
Interface for a callback when blur has finished
|
| Constructor and Description |
|---|
PickerUIBlurHelper(android.content.Context context,
android.util.AttributeSet attrs)
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
handleRecycle()
This method hides the fake ImageView, the blurred image is recycled and the background of the fake ImageView is
cleared.
|
void |
render()
This method first checks if it is necessary to perform the Blur task.
|
void |
setBlurFinishedListener(PickerUIBlurHelper.BlurFinishedListener listener)
Set a callback listener when blur has finished
|
void |
setBlurRadius(int blurRadius)
Select your preferred blur radius to apply
By default blur radius is set to
PickerUIBlur.MIN_BLUR_RADIUS |
void |
setDownScaleFactor(float downScaleFactor)
Apply custom down scale factor
By default down scale factor is set to
PickerUIBlur.MIN_DOWNSCALE |
void |
setFilterColor(int filterColor)
Select the color filter to the blur effect
|
void |
setUseBlur(boolean useBlur)
Method to set the use of blur effect
|
void |
setUseRenderScript(boolean useRenderScript)
Method to set the use of renderScript algorithm
|
void |
showBlurImage(android.graphics.Bitmap bitmapWithBlur)
This method shows the fake ImageView and set the new blurred image.
|
public PickerUIBlurHelper(android.content.Context context,
android.util.AttributeSet attrs)
public void setDownScaleFactor(float downScaleFactor)
PickerUIBlur.MIN_DOWNSCALEdownScaleFactor - Factor customized down scale factor, must be at least 1public void setUseBlur(boolean useBlur)
useBlur - if want to use blurpublic void setUseRenderScript(boolean useRenderScript)
useRenderScript - if want to use renderScript algorithmpublic void setBlurRadius(int blurRadius)
PickerUIBlur.MIN_BLUR_RADIUSblurRadius - The radius to blur the image, radius must be at least 1public void setFilterColor(int filterColor)
filterColor - The color to overlaypublic void showBlurImage(android.graphics.Bitmap bitmapWithBlur)
bitmapWithBlur - the bitmap downscaled and blurred.public void handleRecycle()
public void render()
public void setBlurFinishedListener(PickerUIBlurHelper.BlurFinishedListener listener)
listener - Callback instance.