Giter Site home page Giter Site logo

waitview's Introduction

WaitView

显示等待加载状态的View

Introduce

  • 第二张图为等待加载的状态

默认状态 . 等待加载的状态

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

waitview's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.