public void onto(final ViewGroup target) { factor.width = target.getMeasuredWidth(); factor.height = target.getMeasuredHeight(); if (async) { BlurTask task = new BlurTask( target, factor, new BlurTask.Callback() { @Override public void done(BitmapDrawable drawable) { addView(target, drawable); } }); task.execute(); } else { Drawable drawable = new BitmapDrawable(context.getResources(), Blur.rs(target, factor)); addView(target, drawable); } }
public void into(final ImageView target) { factor.width = capture.getMeasuredWidth(); factor.height = capture.getMeasuredHeight(); if (async) { BlurTask task = new BlurTask( capture, factor, new BlurTask.Callback() { @Override public void done(BitmapDrawable drawable) { target.setImageDrawable(drawable); } }); task.execute(); } else { Drawable drawable = new BitmapDrawable(context.getResources(), Blur.rs(capture, factor)); target.setImageDrawable(drawable); } }