Home

Awesome

WaitView

显示等待加载状态的View

Introduce

<img src="https://raw.githubusercontent.com/ImKarl/WaitView/master/captures/layout_default.png" width="225" height="385" alt="默认状态"/> . <img src="https://raw.githubusercontent.com/ImKarl/WaitView/master/captures/layout_waitview.png" width="225" height="385" alt="等待加载的状态"/>

Features

Usage

Step 1. Add the JitPack repository to your build file

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

Step 2. Add the dependency

compile 'com.github.ImKarl:WaitView:{latestVersion}'

Sample

单个View
WaitViewController.from(mRootView).render();

所有子View
WaitViewController.from(mRootView).renderChilds();
单个View
WaitViewController.from(mRootView).remove();

所有子View
WaitViewController.from(mRootView).removeChilds();
WaitViewController controller = WaitViewController.from(mRootView);

颜色:@ColorInt
controller.color(color);

透明度:@IntRange(from=0, to=255)
controller.alpha(alpha);

圆角半径:@Dimension
controller.radius(radius);

绘制区域:如 new Rect(0, 0, view.getWidth(), view.getHeight())
controller.drawRect(rect);
controller.drawRect(width, height);

过滤器:如 new SimpleOnWaitViewFilter()
controller.filter(filter);

请查看 sample