Skip to content

sineycoder/RippleImage

Repository files navigation

RippleImage

具有涟漪效果的图片加载

first

add repository

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}

add dependency

dependencies {
        implementation 'com.github.SineyCoder:RippleImage:1.2'
}

use

final RippleImage image = findViewById(R.id.image);
        final Handler h = new Handler();
        h.postDelayed(new Runnable() {
            private int i = 0;
            @Override
            public void run() {
                if(i < 100){
                    i++;
                    image.setMask(i+"");//set mask, loading....
                    h.postDelayed(this, 10);
                }else{
                    image.animation();//start ripple animation
                }
            }
        }, 1000);