Android水波纹效果顺手拈来!

RippleLayout(github地址)

A simple wave ripple effect!

Screenshot

Depedency

  1. Add it in your root build.gradle at the end of repositories:

    allprojects {
        repositories {
            ...
            maven { url "https://jitpack.io" }
        }
    }
    
  2. Add the dependency:

    dependencies {
            compile 'com.github.li-xiaojun:RippleLayout:1.0.0'
    }
    

Usage

  • 主要方法:

    rippleLayout.setRippleColor(Color.RED);
    rippleLayout.setRippleInternal(5000);
    rippleLayout.setRippleCenter(100,200);
    rippleLayout.setEndRadius(300);
    rippleLayout.startRipple();
    

你可能感兴趣的:(Android)