在 BlurImageView 中,您可以像 Medium 那样逐步加载图像。首先向用户显示模糊的图像,同时加载真实的图像,一旦加载完成,就替换模糊图像。
在 BlurImageView 中,您可以像 Medium 那样逐步加载图像。首先向用户显示模糊的图像,同时加载真实的图像,一旦加载完成,就替换模糊图像。
BlurImageView For Android, you can load your image progressively like Medium.
You can Download sample apk and play on your phone. Try it!
This lib is inspired by Medium and users love this way of loading pics, Because a beautiful Blurry pic is always better than a blank area or an ugly thumbnail.
Simply add the dependency
dependencies {
compile 'com.wingjay:blurimageviewlib:2.0.1'
} BlurImageView blurImageView = (BlurImageView) findViewById(R.id.XXX);
blurImageView.setBlurImageByUrl(blurImageUrl);This will load and blur a image.
BlurImageView fullBlurImageView = (BlurImageView) findViewById(R.id.XXX)
fullBlurImageView.setFullImageByUrl(blurImageUrl, normalImageUrl);This will load two images progressively.
blurImageView.setBlurFactor(blurFactor);This can set the factor of blurry, default 8 - 10.
blurImageView.setFailDrawable(Drawable failDrawable);
blurImageView.setDefaultDrawable(Drawable defaultDrawable);Configure your own drawable for loading failure & default. Use null to remove them.
Thanks for the algorithms: Stack Blur: http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html
Weibo: http://weibo.com/u/1625892654
Blog: http://wingjay.com/
GitHub: https://github.com/wingjay
Feel free to give me advices by
Thanks!
暂无开放 Issues,或尚未同步最近议题。