BlurImageView
BlurImageView, you can load your image progressively like Medium does.First show user a blurry image, At the same time, load the real image, once loaded, replace the blurry one automatically
Install / Use
/learn @wingjay/BlurImageViewREADME
BlurImageView
BlurImageView For Android, you can load your image progressively like 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.
Playable apk
You can Download sample apk and play on your phone. Try it!
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 get it?
Simply add the dependency
dependencies {
compile 'com.wingjay:blurimageviewlib:2.0.1'
}
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.
blurImageView.setFailDrawable(Drawable failDrawable);
blurImageView.setDefaultDrawable(Drawable defaultDrawable);
Configure your own drawable for loading failure & default. Use null to remove them.
Related resource
Thanks for the algorithms: Stack Blur: http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html
Reach me - wingjay
Weibo: http://weibo.com/u/1625892654
Blog: http://wingjay.com/
GitHub: https://github.com/wingjay
Feel free to give me advices by <mailto:yinjiesh AT 126 DOT com>
Thanks!
Related Skills
node-connect
340.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
340.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.2kCommit, push, and open a PR
