Reprint please indicate the source: Wang 亟亟 's way of Daniel
Yesterday had a dream, wake up to think or want to study harder, so don't talk nonsense, direct loading.
Blurimageview
:
Process:
Implementation principle, loading 2 pictures for a small thumbnail, one for the original image, thumbnail after loading to do a magnified blur, and then expand the progress bar loading the original image, the original load after the successful replacement of thumbnails.
How do I use?
Grade:
{ compile ‘com.wingjay:blurimageviewlib:1.1.0‘}
Eclipse:
Lib directory under the 3 kinds of copy into their own projects just fine
Besides, how do you use this control?
<sample.wjj.blurimageview.lib.BlurImageView android:id="@+id/image" android:layout_width="match_parent" android:layout_height="250dp"/>
Direct reference can be, and there is no custom label ( this side to add, want to preset size, if you use wrap_content will appear small picture a large picture size of a case )
And then just get the object in the OnCreate method and set it again.
blurImageView = (BlurImageView) findViewById(R.id.image); downLoad.setOnClickListener(new View.OnClickListener() { @Override publicvoidonClick(View v) { blurImageView.setFullImageByUrl(IMAGEURL, IMAGEURL1); } });
If you need to switch multiple pictures to the same control again before the Blurimageview.setfullimagebyurl () method is called
public void setBlurFactor(int blurFactor)Method.
Will request more cache space, default is 8
public final static int DEFAULT_BLUR_FACTOR = 8;
How to clear the picture?
Invokes the control. Clear ();
How do I modify the UI of the progress control?
//修改背景色publicvoidsetProgressBarBgColor(int bgColor) { this.loadingCircleProgressView.setProgressBgColor(bgColor); }//修改控件颜色 publicvoidsetProgressBarColor(int color) { this.loadingCircleProgressView.setProgressColor(color); }
Example Address: Https://github.com/ddwhan0123/BlogSample/blob/master/BlurImageView.zip
Git address: Https://github.com/ddwhan0123/BlurImageView
Flipping through git---a picture-loading control based on Universalimageloader implementation Blurimageview