逐步加图片的Android控件:BlurImageView
jopen
9年前
BlurImageView For Android,你可以用它来逐步加你的图就像Medium。
How it works?
- First it will show user a blurry image;
- At the same time, it starts to load the real image;
- once loaded, replace the blurry one automatically.
Why I do this?
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.
How to use it?
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.